Posted On: Jul 9, 2018
You can now develop your Amazon 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 Amazon Web Services 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 Amazon Web Services.
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 Amazon CLI or Amazon Lambda console. You can also use the Amazon 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 Amazon Web Services China (Beijing) region, operated by Sinnet and in Amazon Web Services China (Ningxia) region, operated by NWCD. For more information on where Amazon Lambda is available, see the Amazon Web Services region table. Please visit our product page for more information about Amazon Lambda or log in to the Amazon Lambda console to get started.