Amazon.Lambda.AspNetCoreServer.Hosting 1.7.0

Amazon.Lambda.AspNetCoreServer.Hosting

This package allows ASP .NET Core applications written using the minimal api style to be deployed as AWS Lambda functions. This is done by adding a call to AddAWSLambdaHosting to the services collection of the application. This method takes in the LambdaEventSource enum that configures which Lambda event source the Lambda function will be configured for.

The AddAWSLambdaHosting will setup the Amazon.Lambda.AspNetCoreServer package to process the incoming Lambda events as ASP .NET Core requests. It will also initialize Amazon.Lambda.RuntimeSupport package to interact with the Lambda service.

Sample ASP .NET Core application

The code sample below is the typical initilization code for an ASP .NET Core application using the minimal api style. The one difference is the extra line of code calling AddAWSLambdaHosting.

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.

builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

// Register Lambda to replace Kestrel as the web server for the ASP.NET Core application.
// If the application is not running in Lambda then this method will do nothing. 
builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi);

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();

No packages depend on Amazon.Lambda.AspNetCoreServer.Hosting.

Version Downloads Last updated
2.2.1 15 08/21/2026
2.2.0 8 08/05/2026
2.1.0 15 06/20/2026
2.0.0 9 06/23/2026
1.10.0 16 02/24/2026
1.9.1 14 03/01/2026
1.9.0 18 07/19/2025
1.8.2 16 06/25/2025
1.8.1 14 06/16/2025
1.8.0 13 04/29/2025
1.7.4 16 04/08/2025
1.7.3 18 12/22/2024
1.7.2 18 12/22/2024
1.7.1 18 11/12/2024
1.7.0 13 08/06/2024
1.6.1 21 12/31/2023
1.6.0 19 12/22/2023
1.5.1 66 02/28/2024
1.5.0 17 01/06/2024
1.4.0 17 05/25/2024
1.3.1 21 03/05/2024
1.3.0 15 06/20/2026
1.2.0 18 01/06/2024
1.1.0 17 01/05/2024
1.0.0 19 01/05/2024