AWS Lambda Supports .NET Core 2.1

Posted on: Jul 9, 2018

You can now develop your AWS Lambda function code in C# using the .NET Core 2.1 runtime which will soon be the Long Term Support (LTS) version of .NET Core. You can use any of the new runtime features such as the more performant HTTP client implementation and types for representing contiguous regions of arbitrary memory. For more details, read the Lambda documentation

The easiest way to get started is with the AWS Toolkit for Visual Studio which includes project templates for individual C# Lambda functions, full C# serverless applications, and tools to publish both project types to AWS.

To manually create a C# Lambda function, specify the Lambda runtime parameter as dotnetcore2.1 and upload the ZIP of all NuGet dependencies as well as your own published DLL assemblies through the AWS CLI or AWS Lambda console. You can also use the AWS Serverless Application Model (SAM) to deploy and manage serverless applications authored in C#. For an example of how to migrate a .NET Core 2.0 AWS Lambda function to a .NET Core 2.1, read this blog post

The Lambda programming model for 2.1 is fully compatible with 2.0. If you have existing C# functions running on 2.0, you can simply switch to the new runtime by updating your .NET project’s target framework moniker to netcoreapp2.1 and re-deploying the function with the new dotnetcore2.1 runtime.

The .NET Core 2.1 runtime is available in all regions where Lambda is available. For more information on where AWS Lambda is available, see the AWS region table. To learn more about AWS Lambda, visit our product page or log in to the AWS Lambda console.