Setting up your .NET development environment - Amazon Lambda
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Setting up your .NET development environment

To develop and build your Lambda functions, you can use any of the commonly available .NET integrated development environments (IDEs), including Microsoft Visual Studio, Visual Studio Code, and JetBrains Rider. To simplify your development experience, Amazon provides a set of .NET project templates, as well as the Amazon.Lambda.Tools command line interface (CLI).

Run the following .NET CLI commands to install these project templates and command line tools.

Installing the .NET project templates

To install the project templates (.NET 7 and .NET 8):

dotnet new install Amazon.Lambda.Templates

To install the project templates (.NET 6):

dotnet new --install Amazon.Lambda.Templates
Note

If you're using the .NET 6 managed Lambda runtime, we recommend that you upgrade to use .NET 8. To learn more, see Managing Amazon Lambda runtime upgrades and Introducing the .NET 8 runtime for Amazon Lambda on the Amazon Compute Blog.

Installing and updating the CLI tools

Run the following commands to install, update, and uninstall the Amazon.Lambda.Tools CLI.

To install the command line tools:

dotnet tool install -g Amazon.Lambda.Tools

To update the command line tools:

dotnet tool update -g Amazon.Lambda.Tools

To uninstall the command line tools:

dotnet tool uninstall -g Amazon.Lambda.Tools