Getting started with Windows .NET on Elastic Beanstalk
To get started with .NET applications on AWS Elastic Beanstalk, you only need an application source bundle to upload as your first application version and deploy to an environment. When you create an environment, Elastic Beanstalk allocates all of the AWS resources needed to run a highly scalable web application.
Launching an environment with a sample Windows .NET application
Elastic Beanstalk provides single page sample applications for each platform.
Samples | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name |
Supported configurations |
Environment type |
Source |
Description |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.NET Default |
WS 2022 WS 2022 Server Core WS 2019 WS 2019 Server Core WS 2016 WS 2016 Server Core |
Web Server |
ASP.NET Core sample application with a single page configured to be displayed at the website root. |
Windows Server 2012 R2 platform branches retirement
The following Elastic Beanstalk platform branches are now retired:
-
Windows Server 2012 R2 running IIS 8.5
-
Windows Server Core 2012 R2 running IIS 8.5
If you currently use these retiring platform branches, we strongly recommend that you start planning your migration to one of the following Windows Server platform branches, which are current and fully supported:
-
Windows Server 2022 with IIS 10.0 version 2.x
-
Windows Server 2019 with IIS 10.0 version 2.x
For full migration considerations, see Migrating from earlier major versions of the Windows server platform.
For more information about platform deprecation, see Elastic Beanstalk platform support policy.
Note
Once retired, the Windows Server 2012 platform branches are no longer available from the Elastic Beanstalk console. You can continue to operate your existing environments that are based on these retired platform branches until March 4, 2024, which is 90 days after the December 4 retirement date.
Elastic Beanstalk will make Beanstalk Windows 2012 AMIs private after March 4, 2024. This action will prevent the launching of instances in your Windows 2012 environments that use the default Beanstalk AMI. In order to retain access to the AMIs, you may copy the AMIs into your accounts for use in your Beanstalk environments. For detailed instructions, see Preserving access to an Amazon Machine Image (AMI) for a retired platform.
Download any of the sample applications and deploy it to Elastic Beanstalk by using the following procedure.
To launch an environment with a sample application (console)
Open the Elastic Beanstalk console
, and in the Regions list, select your AWS Region. -
In the navigation pane, choose Applications, and then choose an existing application's name in the list or create one.
-
On the application overview page, choose Create new environment.
This launches the Create environment wizard. The wizard provides a set of steps for you to create a new environment.
-
For environment tier, choose the Web server environment or Worker environment environment tier. You can't change an environment's tier after creation.
Note
The .NET on Windows Server platform doesn't support the worker environment tier.
-
For Platform, select the platform and platform branch that match the language your application uses.
Note
Elastic Beanstalk supports multiple versions for most of the platforms that are listed. By default, the console selects the recommended version for the platform and platform branch you choose. If your application requires a different version, you can select it here. For information about supported platform versions, see Elastic Beanstalk supported platforms.
-
For Application code, choose Sample application.
-
For Configuration presets, choose Single instance.
-
Choose Next.
-
The Configure service access page displays.
-
Choose Use an existing service role for Service Role.
-
Next, we'll focus on the EC2 instance profile dropdown list. The values displayed in this dropdown list may vary, depending on whether you account has previously created a new environment.
Choose one of the following, based on the values displayed in your list.
If
aws-elasticbeanstalk-ec2-role
displays in the dropdown list, select it from the EC2 instance profile dropdown list.If another value displays in the list, and it’s the default EC2 instance profile intended for your environments, select it from the EC2 instance profile dropdown list.
If the EC2 instance profile dropdown list doesn't list any values to choose from, expand the procedure that follows, Create IAM Role for EC2 instance profile.
Complete the steps in Create IAM Role for EC2 instance profile to create an IAM Role that you can subsequently select for the EC2 instance profile. Then return back to this step.
Now that you've created an IAM Role, and refreshed the list, it displays as a choice in the dropdown list. Select the IAM Role you just created from the EC2 instance profile dropdown list.
-
Choose Skip to Review on the Configure service access page.
This will select the default values for this step and skip the optional steps.
-
The Review page displays a summary of all your choices.
To further customize your environment, choose Edit next to the step that includes any items you want to configure. You can set the following options only during environment creation:
-
Environment name
-
Domain name
-
Platform version
-
Processor
-
VPC
-
Tier
You can change the following settings after environment creation, but they require new instances or other resources to be provisioned and can take a long time to apply:
-
Instance type, root volume, key pair, and AWS Identity and Access Management (IAM) role
-
Internal Amazon RDS database
-
Load balancer
For details on all available settings, see The create new environment wizard.
-
-
Choose Submit at the bottom of the page to initialize the creation of your new environment.
To create a an IAM Role for EC2 instance profile selection
-
Choose View permission details. This displays under the EC2 instance profile dropdown list.
A modal window titled View instance profile permissions displays. This window lists the managed profiles that you'll need to attach to the new EC2 instance profile that you create. It also provides a link to launch the IAM console.
-
Choose the IAM console link displayed at the top of the window.
-
In the IAM console navigation pane, choose Roles.
-
Choose Create role.
-
Under Trusted entity type, choose AWS service.
-
Under Use case, choose EC2.
-
Choose Next.
-
Attach the appropriate managed policies. Scroll in the View instance profile permissions modal window to see the managed policies. The policies are also listed here:
-
AWSElasticBeanstalkWebTier
-
AWSElasticBeanstalkWorkerTier
-
AWSElasticBeanstalkMulticontainerDocker
-
-
Choose Next.
-
Enter a name for the role.
-
(Optional) Add tags to the role.
-
Choose Create role.
-
Return to the Elastic Beanstalk console window that is open.
-
Close the modal window View instance profile permissions.
Important
Do not close the browser page that displays the Elastic Beanstalk console.
-
Choose (refresh), next to the EC2 instance profile dropdown list.
This refreshes the dropdown list, so that the Role you just created will display in the dropdown list.
Next steps
After you have an environment running an application, you can deploy a new version of the application or a completely different application at any time. Deploying a new application version is quick because it doesn't require provisioning or restarting EC2 instances.
After you've deployed a sample application or two and you're ready to start developing locally, you can follow the instructions in the next section to set up a .NET development environment.