Building Lambda functions with C#
The following sections explain how common programming patterns and core concepts apply when authoring Lambda function code in C#.
You can run your .NET application in Lambda using the managed .NET 6 runtime, a custom runtime, or a container image. After your application code is compiled, you can deploy it to Lambda either as a .zip file or a container image.
Lambda provides the following runtimes for .NET languages:
.NET | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | Identifier | Operating system | Architectures | Deprecation (Phase 1) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.NET 7 (container only) |
|
Amazon Linux 2 |
x86_64, arm64 |
May 14, 2024 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.NET 6 |
|
Amazon Linux 2 |
x86_64, arm64 |
Note
For end of support information about .NET Core 3.1, see Runtime deprecation policy.
Topics
- Setting up your .NET development environment
- Lambda function handler in C#
- Build and deploy C# Lambda functions with .zip file archives
- Deploy .NET Lambda functions with container images
- .NET functions with native AOT compilation
- AWS Lambda context object in C#
- Lambda function logging in C#
- AWS Lambda function errors in C#
- Instrumenting C# code in AWS Lambda
- AWS Lambda function testing in C#