Posted On: Nov 15, 2022

Today, we are excited to announce general availability of tooling support to build and deploy native AOT compiled .NET 7 applications to AWS Lambda. .NET 7 is the latest version of .NET and brings several performance improvements and optimizations, including support for the native AOT deployment model. Native AOT compiles .NET applications to native code. By using native AOT with AWS Lambda, you can enable faster application starts, resulting in improved end-user experience. You can also benefit from reduced costs through faster initialization times and lower memory consumption of native AOT applications on AWS Lambda. 

Native AOT allows .NET applications to be pre-compiled to a single binary removing the need for just-in-time (JIT) compilation, enabling native AOT enabled apps to start up faster. In our benchmarks, native AOT enabled applications demonstrated an average 44% (and up to 86%) improvement in cold start times. See the results here.

With this release, you can build, test, debug, and deploy .NET lambda functions running native AOT using AWS Extensions for .NET CLI - Amazon Lambda Tools, from within Visual Studio using the AWS Toolkit for Visual Studio, or by using the AWS Serverless Application Model (SAM) CLI.

You can use .NET 7 native AOT with AWS Lambda in all regions where AWS Lambda is available. To learn more and to get started, please visit our Amazon Lambda Tools documentation, SAM CLI documentation, and blog post.