Skip to content

Latest commit

 

History

History

dotnet6

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

.NET 6 support on AWS

Overview

This guide describes .NET 6 support provided by AWS services and tools. The guide will be updated as new support is added.

Related Content:

Introduction

Customers and AWS teams are excited about the release of .NET 6. Many organizations will want to target .NET 6 because it is a Long Term Support (LTS) release. .NET 6 applications can already use many AWS services without additional work. For example, it is possible to deploy a new virtual machine instance (Amazon EC2) and by adding a command to install the .NET 6 runtime as part of the deployment, the instance will support .NET 6 applications.

This guide is focused on AWS services and tools that have either been updated, or are being updated, to provide .NET 6 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 6 today. These are called out in the sections below.

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

Compute Services

Amazon EC2

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

The following EC2 User Data example installs .NET 6 targeting ARM64 (AWS Graviton2 processors):

#!/bin/bash
# Install .NET 6 SDK for ARM64
sudo apt-get update -y
curl -O https://download.visualstudio.microsoft.com/download/pr/adcd9310-5072-4179-9b8b-16563b897995/15a7595966f488c74909e4a9273c0e24/dotnet-sdk-6.0.100-linux-arm64.tar.gz
mkdir /usr/bin/dotnet
sudo tar -zxvfdotnet-sdk-6.0.100-linux-arm64.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'

An updated version of the preconfigured Amazon Machine Image (AMI) with MATE Desktop Environment that includes .NET 6 is available. Search for amzn2-x86_64-MATEDE_DOTNET-2021.11.17 AMI and select the result under the Community AMI section:

MATE DE with .NET 6

EC2 Image Builder simplifies the building, testing, and deployment of virtual machines and container images for use on AWS or on-premises. .NET 6 can be added to images created with Image Builder in two ways:

  1. AWS CloudFormation Template - A sample Image Builder CloudFormation Template can be used to build an Ubuntu Server 20 Image with .NET 6.
  2. Image Builder Components - Image Builder offers Amazon-managed .NET 6 components (runtime and SDK) supporting Windows and Linux distributions. Additionally, a component that provides the ASP.NET Core Hosting Bundle for .NET 6 is available for Windows.

EC2 Image Builder .NET 6 Windows components

EC2 Image Builder .NET 6 Linux components

AWS Elastic Beanstalk

AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with .NET and other languages. Customers can target both Windows Server and Amazon Linux 2 platforms to deploy their applications. Both operating systems come with .NET 6 preinstalled.

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 6 applications, upload an image with the .NET 6 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 Lambda

AWS Lambda is a serverless, event-driven compute service that can run virtually any type of application or backend service without provisioning or managing servers. You can run .NET 6 applications, targeting x86_64 or ARM64 (AWS Graviton2), on AWS Lambda. Lambda includes a managed runtime for .NET 6.

The AWS Toolkit for Visual Studio allows customers to build and deploy .NET 6 applications that run on AWS Lambda.

Tools, Libraries, and SDK

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 6 development, and customers can download the AWS Toolkit for Visual Studio 2022 from the Visual Studio Marketplace.

When deploying .NET 6 applications to Elastic Beanstalk, make sure the "Build self contained deployment bundle" is selected.

Build self contained deployment bundle

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 to setup. Note, select the "ECR/ECR public" option (image source) for .NET applications.

The Toolkit also provides an option to create a new .NET application that runs on AWS Lambda, including creation of the AWS Serverless Application Model (SAM) template used to deploy to Lambda. The Toolkit also provides the ability to deploy a .NET application to Lambda using a SAM template. Matt Ellis details these steps in his blog post. Support for deploying .NET 6 applications targeting Lambda is available for both x86_64 and ARM64 (AWS Graviton2).

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 6 applications. The Toolkit supports building and debugging AWS Serverless Application Model (SAM) templates used to deploy applications to AWS Lambda targeting .NET 6 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 6 applications can be used with the Toolkit.

AWS SAM CLI

The AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications. It provides shorthand syntax to express functions, APIs, databases, and event source mappings. The SAM CLI provides a Lambda-like execution environment that lets you locally build, test, and debug applications defined by SAM templates or through the AWS Cloud Development Kit (CDK). The SAM CLI provides support for targeting .NET 6.

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 6, and is available from NuGet. Learn how to get started with the AWS SDK for .NET in the Developer Guide.

.NET High Level Libraries

All the below libraries have been tested and are compatible with .NET 6.

.NET deployment tool

The AWS .NET deployment tool preview helps customers choose the right AWS service to host a .NET application, and guides them through the deployment process. The deployment tool supports targeting .NET 6 for deployments to AWS App Runner, AWS Fargate, and AWS Lambda. Learn more about the .NET deployment tool preview using either the .NET CLI or the AWS Toolkit for Visual Studio Publish to AWS option.

Porting Assistant for .NET

The Porting Assistant for .NET is an analysis tool that scans .NET Framework applications and generates a .NET Core compatibility assessment, making it faster and easier to port .NET Framework applications to Linux. The tool quickly scans .NET Framework applications to identify incompatibilities with .NET Core, finds known replacements, and generates a detailed compatibility assessment. .NET Core 3.1, .NET 5, and .NET 6 are supported as targets.

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. Customers can containerize .NET Framework, .NET Core 3.1, .NET 5, and .NET 6 applications with A2C.

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 6. 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 6 applications can integrate AWS X-Ray with AWS X-Ray SDK for .NET and the AWS Distro for OpenTelemetry .NET.

DevOps

AWS CodeBuild

AWS CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy. .NET 6 is supported in the standard build image.

AWS Cloud Development Kit (CDK)

AWS Cloud Development Kit (AWS CDK) is an open source software development framework to define your cloud application resources using familiar programming languages. The CDK supports .NET 6. Learn how to get started with these CDK with C# examples.

Databases

AWS offers 15+ purpose-built engines to support diverse data models, including relational, key-value, document, in-memory, graph, time series, wide column, and ledger databases. Customers can incorporate these managed database instances into their .NET 6 applications using the AWS SDK for .NET.

Amazon DynamoDB

Amazon DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-region replication, in-memory caching, and data export tools. The AWS SDK for .NET offers several programming models to access DynamoDB. Follow these examples to get started. .NET 6 applications are supported.

Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10 times performance improvement-from milliseconds to microseconds-even at millions of requests per second. The DAX .NET Client is compatible with .NET 6.

Amazon Quantum Ledger Database (QLDB)

Amazon Quantum Ledger Database (QLDB) is a fully managed ledger database that provides a transparent, immutable, and cryptographically verifiable transaction log. The Amazon QLDB driver for .NET supports .NET 6 and other versions of .NET to support applications interacting with data stored in ledgers.