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 like 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, you simply 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#.

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 now available in AWS China (Beijing) region, operated by Sinnet and in AWS China (Ningxia) region, operated by NWCD. For more information on where AWS Lambda is available, see the AWS region table. Please visit our product page for more information about AWS Lambda or log in to the AWS Lambda console to get started.