Amazon.Lambda.AspNetCoreServer.Hosting
1.7.3
Prefix Reserved
dotnet add package Amazon.Lambda.AspNetCoreServer.Hosting --version 1.7.3
NuGet\Install-Package Amazon.Lambda.AspNetCoreServer.Hosting -Version 1.7.3
<PackageReference Include="Amazon.Lambda.AspNetCoreServer.Hosting" Version="1.7.3" />
paket add Amazon.Lambda.AspNetCoreServer.Hosting --version 1.7.3
#r "nuget: Amazon.Lambda.AspNetCoreServer.Hosting, 1.7.3"
// Install Amazon.Lambda.AspNetCoreServer.Hosting as a Cake Addin #addin nuget:?package=Amazon.Lambda.AspNetCoreServer.Hosting&version=1.7.3 // Install Amazon.Lambda.AspNetCoreServer.Hosting as a Cake Tool #tool nuget:?package=Amazon.Lambda.AspNetCoreServer.Hosting&version=1.7.3
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.
Supported .NET versions
This library supports .NET 6 and above. Lambda provides managed runtimes for long term supported (LTS) versions like .NET 6 and .NET 8. To use standard term supported (STS) versions like .NET 9 the Lambda function must be bundled as a self contained executable or an OCI image.
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();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Amazon.Lambda.APIGatewayEvents (>= 2.7.1)
- Amazon.Lambda.AspNetCoreServer (>= 9.0.3)
- Amazon.Lambda.Core (>= 2.5.0)
- Amazon.Lambda.RuntimeSupport (>= 1.12.1)
-
net8.0
- Amazon.Lambda.APIGatewayEvents (>= 2.7.1)
- Amazon.Lambda.AspNetCoreServer (>= 9.0.3)
- Amazon.Lambda.Core (>= 2.5.0)
- Amazon.Lambda.RuntimeSupport (>= 1.12.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Amazon.Lambda.AspNetCoreServer.Hosting:
Package | Downloads |
---|---|
Fen.Service
Standardized Service conventions, from the opinions of the Fulfiller Enablement team. |
|
JuegoFramework
Package Description |
|
AHROdata
Package Description |
|
Lambifast
Package Description |
|
AlexaVoxCraft.Lambda.AspNetCoreServer
Package Description |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Amazon.Lambda.AspNetCoreServer.Hosting:
Repository | Stars |
---|---|
aws/aws-lambda-dotnet
Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
|
|
Elfocrash/aws-videos
|
|
aws-samples/serverless-dotnet-demo
|
Version | Downloads | Last updated |
---|---|---|
1.7.3 | 1,942 | 11/26/2024 |
1.7.2 | 8,092 | 11/20/2024 |
1.7.1 | 194,015 | 9/5/2024 |
1.7.0 | 679,922 | 2/16/2024 |
1.6.1 | 294,075 | 11/14/2023 |
1.6.0 | 846,570 | 3/24/2023 |
1.5.1 | 100,150 | 3/1/2023 |
1.5.0 | 234,760 | 12/9/2022 |
1.4.0 | 28,961 | 12/7/2022 |
1.3.1 | 618,106 | 5/27/2022 |
1.3.0 | 89,371 | 5/18/2022 |
1.2.0 | 12,499 | 5/7/2022 |
1.1.0 | 135,192 | 3/15/2022 |
1.0.0 | 68,034 | 11/5/2021 |