CdkReloaded.Net.Runtime.Lambda 0.1.1

dotnet add package CdkReloaded.Net.Runtime.Lambda --version 0.1.1
                    
NuGet\Install-Package CdkReloaded.Net.Runtime.Lambda -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CdkReloaded.Net.Runtime.Lambda" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CdkReloaded.Net.Runtime.Lambda" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="CdkReloaded.Net.Runtime.Lambda" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CdkReloaded.Net.Runtime.Lambda --version 0.1.1
                    
#r "nuget: CdkReloaded.Net.Runtime.Lambda, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CdkReloaded.Net.Runtime.Lambda@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CdkReloaded.Net.Runtime.Lambda&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=CdkReloaded.Net.Runtime.Lambda&version=0.1.1
                    
Install as a Cake Tool

CDK Reloaded

Write .NET functions. Get AWS infrastructure for free.

CDK Reloaded is a .NET 10 framework that eliminates the gap between writing application code and deploying it to AWS. Define HTTP functions and DynamoDB tables with simple interfaces and attributes — the framework auto-generates Lambda functions, API Gateway routes, and DynamoDB tables via AWS CDK.

dotnet run           → Local Kestrel server with in-memory DynamoDB
dotnet run -- deploy → Publishes to Lambda, generates CDK, deploys to AWS

Zero CloudFormation. Zero YAML. Zero Terraform. Just C#.


Quick Start

1. Create a new project

dotnet new web -n MyApi
cd MyApi
dotnet add package CdkReloaded.Net

2. Define a model

using CdkReloaded.Abstractions;

public class Order : ITableEntity
{
    [PartitionKey] public string Id { get; set; } = default!;
    public string CustomerName { get; set; } = default!;
    public decimal Total { get; set; }
}

3. Write a function

using CdkReloaded.Abstractions;

public record CreateOrderRequest(string CustomerName, decimal Total);
public record CreateOrderResponse(string Id);

[HttpApi(Method.Post, "/orders")]
public class CreateOrder(ITable<Order> orders) : IHttpFunction<CreateOrderRequest, CreateOrderResponse>
{
    public async Task<CreateOrderResponse> HandleAsync(CreateOrderRequest request, CancellationToken ct = default)
    {
        var order = new Order
        {
            Id = Guid.NewGuid().ToString(),
            CustomerName = request.CustomerName,
            Total = request.Total
        };
        await orders.PutAsync(order, ct);
        return new CreateOrderResponse(order.Id);
    }
}

4. Wire it up

using CdkReloaded.Hosting;

var builder = CloudApplication.CreateBuilder(args);
builder.AddFunctions().FromAssembly();
builder.AddTables().FromAssembly();

var app = builder.Build();
app.Run();

5. Run it

# Local development (Kestrel + in-memory DynamoDB)
dotnet run

# Deploy to AWS (Lambda + API Gateway + DynamoDB)
dotnet run -- deploy

That's it. The same code runs locally and on AWS.


CLI Commands

Command Description
dotnet run Start local development server
dotnet run -- deploy Build, synthesize CDK, deploy to AWS
dotnet run -- synth Generate CloudFormation template without deploying
dotnet run -- diff Show changes between local and deployed stack
dotnet run -- destroy Remove the deployed AWS stack
dotnet run -- list List all discovered functions and tables

How It Works

Your Code (.NET 10)
    |
    v
CloudApplicationBuilder.Build()
    ├── Discovers [HttpApi] functions via reflection
    ├── Discovers ITableEntity models
    ├── Validates DI dependencies
    └── Resolves runtime based on execution mode
           |
    ┌──────┼──────────────┐
    v      v              v
  Local   Lambda        CDK Deploy
  Runtime Runtime       Runtime
    |      |              |
    v      v              v
  Kestrel  AWS Lambda   dotnet publish
  + InMemory + DynamoDB + CDK synth
  Tables     Tables     + cdk deploy

Three execution modes, one codebase:

  • Local (dotnet run): ASP.NET Kestrel server with in-memory DynamoDB tables
  • Lambda (AWS): Lambda custom runtime with real DynamoDB
  • Deploy (dotnet run -- deploy): Generates and deploys AWS CDK infrastructure

Runtimes are auto-discovered via assembly scanning — just add the NuGet package and the framework finds it.


Documentation

Document Description
Getting Started Step-by-step tutorial
Architecture How the framework works internally
Functions Writing HTTP functions
DynamoDB Table abstraction and data modeling
Configuration Defaults, per-function config, options
CLI Reference All CLI commands in detail
Deployment AWS deployment guide
Error Handling Exception hierarchy and error responses

Project Structure

src/
  CdkReloaded.Abstractions/    # Interfaces, attributes (IFunction, ITable, [HttpApi])
  CdkReloaded.Hosting/          # Builder, discovery, CLI, runtime abstraction
  CdkReloaded.DynamoDb/         # InMemoryTable + DynamoDbTable implementations
  CdkReloaded.Runtime.Local/    # Kestrel-based local dev server
  CdkReloaded.Runtime.Lambda/   # AWS Lambda custom runtime
  CdkReloaded.Cdk/              # CDK stack generation + deploy
  CdkReloaded/                   # Meta-package (references all above)
samples/
  CdkReloaded.Sample.OrderApi/  # Complete example application
tests/
  CdkReloaded.*.Tests/          # Unit and integration tests

Requirements

  • .NET 10 SDK
  • Node.js (for AWS CDK CLI, only needed for deployment)
  • AWS CLI configured (only needed for deployment)

Key Design Principles

  1. Convention over configuration — Functions are discovered by scanning for [HttpApi] + IHttpFunction<,>. Tables are discovered by scanning for ITableEntity. No manual registration needed.

  2. Same code, everywhere — Your function code doesn't know if it's running on Kestrel or Lambda. ITable<T> resolves to InMemoryTable<T> locally and DynamoDbTable<T> on AWS.

  3. Infrastructure from code — The CDK runtime reads your function/table registrations and generates CloudFormation. No separate IaC files to maintain.

  4. Fail fast — DI dependencies are validated at build time. Missing services throw DependencyValidationException before the app starts, not at request time.


License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CdkReloaded.Net.Runtime.Lambda:

Package Downloads
CdkReloaded.Net

Meta-package for CdkReloaded.Net — includes all components for building serverless .NET apps with auto-generated AWS CDK infrastructure.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 105 2/11/2026
0.1.0 104 2/11/2026