Skip to content

Latest commit

 

History

History

dotnet7

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

.NET 7 support on AWS

Overview

This guide describes .NET 7 support provided by AWS services and tools. The guide will be updated as new support is added. At the moment .NET 7 is still in a pre-release stage, so levels of support may change leading up to the final release.

Related Content:

Introduction

The latest release of .NET 7 brings some exciting new features to .NET including performance increases, and Native AoT compilation of .net code. .NET 7 can be used with a number of AWS services such as (Amazon EC2) where the runtime is installed manually.

This guide is focused on AWS services and tools that have either been updated, or are being updated, to provide .NET 7 support. While we work to test and validate support for the GA release of .NET 6 to all services and tools, there are some steps you can take to use .NET 7 today. These are called out in the sections below.

Please open an Issue on this repository with questions about .NET 7 support on AWS. We use this feedback to help us prioritize updates.

Compute Services

Amazon EC2

Customers can install .NET 7 on over 400 Amazon EC2 instances types.

The following EC2 User Data example installs .NET 7 on a linux server.

#!/bin/bash # Install .NET 7 SDK for Linux sudo apt-get update -y curl -O https://download.visualstudio.microsoft.com/download/pr/253e5af8-41aa-48c6-86f1-39a51b44afdc/5bb2cb9380c5b1a7f0153e0a2775727b/dotnet-sdk-7.0.100-linux-x64.tar.gz mkdir /usr/bin/dotnet sudo tar -zxvf dotnet-sdk-7.0.100-linux-x64.tar.gz -C /usr/bin/dotnet sudo ln -s /usr/bin/dotnet/dotnet /usr/bin/dotnet sudo sh -c 'echo "export DOTNET_ROOT=/usr/bin/dotnet" >> /etc/environment' sudo sh -c 'echo "export PATH=$PATH:$DOTNET_ROOT" >> /etc/environment' 

Install scripts for .NET can be found here: https://dotnet.microsoft.com/en-us/download/dotnet/scripts

Customers can use automation facilities in the AWS Systems Manager Service to automatically install .NET runtimes using automation documents, and use the EC2 Image Builder service to precreate EC2 Images with the .NET Runtime pre-installed.

AWS Lambda

AWS Lambda supports running .NET 7 applications in two ways. You can create your own
custom runtime or you can publish native code to Lambda using .NET 7's native AOT compilation. A blog post on how to create native lambda functions is available here.

Containers

AWS customers can deploy .NET applications running on either Windows or Linux containers using Amazon Elastic Container Software (ECS) and Amazon Elastic Kubernetes Service (EKS). AWS Fargate is a service that you can use to run and manage the lifecycle of ECS and EKS containers without the need to manage the container infrastructure yourself.

AWS App Runner is a fully managed service that makes it easy to quickly deploy containerized web applications and APIs, scaling up or down automatically to meet application traffic needs. To use with .NET 7 applications, upload an image with the .NET 7 application to Amazon Elastic Container Registry (ECR) and use the source image support to configure AWS App Runner to start, run, scale, and load balance the application.

AWS Elastic Beanstalk allows customers to package up their applications and deploy to elastic beanstalk as a container image. By using containers, customer can deplooy .NET 7 applications on Elastic Beanstalk.

Tools, Libraries, and SDK

AWS Code Build

AWS Code Build is a fully managed service to help developers automatically build applications from source code. The code build service allows the user to customize the build environment, to suit the needs of the application being built. This includes the ability to install additional .NET runtimes. Users can add support for building .NET 7 applications by adding the following snippet to their applications buildspec.yml file.

 install: commands: - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel STS 

This will automatically download an install the .NET 7 SDK as part of the Install phase of CodeBuild.

AWS Toolkit for Visual Studio

The AWS Toolkit for Visual Studio is an extension for Microsoft Visual Studio on Windows that makes it easier for developers to develop, debug, and deploy .NET applications using Amazon Web Services. Visual Studio 2022 supports .NET 7 development, and customers can download the AWS Toolkit for Visual Studio 2022 from the Visual Studio Marketplace.

AWS Toolkit for Rider

The AWS Toolkit for Rider is an open source plug-in for the JetBrains Rider IDE that makes it easier to create, debug, and deploy .NET applications on Amazon Web Services. The Toolkit supports creating a new AWS App Runner service to manage containers, which can host .NET 6 applications. Follow the documentation here to setup. Note, select the "ECR/ECR public" option (image source) for .NET applications.

AWS Toolkit for Visual Studio Code

The AWS Toolkit for Visual Studio Code is an open source plug-in for the Visual Studio Code editor that makes it easier to create, debug, and deploy applications on Amazon Web Services. The Toolkit supports creating a new AWS App Runner service to manage containers, which can host .NET 7 applications.

AWS Toolkit for Azure DevOps

The AWS Toolkit for Azure DevOps is an extension for hosted and on-premises Microsoft Azure DevOps that makes it easy to manage and deploy applications to AWS. .NET 7 applications can be used with the Toolkit.

AWS SDK for .NET

The AWS SDK for .NET allows .NET developers to integrate AWS services into their application code in a familiar and consistent manner. The library is compatible with .NET 7, and is available from NuGet. Learn how to get started with the AWS SDK for .NET in the Developer Guide.

AWS App2Container

AWS App2Container (A2C) is a command-line tool for modernizing .NET and Java applications into containerized applications. A2C analyzes and builds an inventory of all applications running in virtual machines, on-premises or in the cloud. Applications are selected to be containerized, and A2C packages the application artifact and identified dependencies into container images, configures the network ports, and generates the ECS task and Kubernetes pod definitions. A2C provisions, through CloudFormation, the cloud infrastructure and CI/CD pipelines required to deploy the containerized .NET or Java application into production.

Security and Diagnostics

AWS Secrets Manager

AWS Secrets Manager helps you protect secrets needed to access your applications, services, and IT resources. The service enables you to easily rotate, manage, and retrieve database credentials, API keys, and other secrets throughout their lifecycle.

The AWS Secrets Manager Caching Client for .NET enables in-process caching of secrets and is compatible with .NET 7. Please refer to this blog post to learn more about how to use AWS Secrets Manager client-side caching in .NET.

AWS X-Ray

AWS X-Ray helps developers analyze and debug distributed applications, such as those built using a microservices architecture. .NET 7 applications can integrate AWS X-Ray with AWS X-Ray SDK for .NET and the AWS Distro for OpenTelemetry .NET.

close