Getting started with .NET Core on Linux - AWS Elastic Beanstalk

Getting started with .NET Core on Linux

To get started with .NET Core on Linux applications on AWS Elastic Beanstalk, all you need is an application source bundle to upload as your first application version, and then to deploy it 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 .NET Core on Linux application

Elastic Beanstalk provides single-page sample applications for each platform.

Samples

Supported configurations

Environment type

Source bundle

Description

.NET Core on Linux

Web server

dotnet-core-linux.zip

Single-page application.

.NET Core on Linux

Web server

dotnet-core-linux-multiple-apps.zip

Two web applications that run on the same web server.

Download the sample application and deploy it to Elastic Beanstalk by following these steps.

Old console
To launch an environment with a sample application (console)
  1. Open the Elastic Beanstalk console, and in the Regions list, select your AWS Region.

  2. In the navigation pane, choose Applications, and then choose an existing application's name in the list or create one.

  3. On the application overview page, choose Create a new environment.

    
              The application overview page with a list of application environments on the Elastic Beanstalk console
  4. Next, 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.

    
              The Select environment tier page on the Elastic Beanstalk console
  5. 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, or choose Configure more options, as described in step 7. For information about supported platform versions, see Elastic Beanstalk supported platforms.

  6. For Application code, choose Sample application.

  7. To further customize your environment, choose Configure more options. 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.

  8. Choose Create environment.

New console
Note

We're releasing a new Elastic Beanstalk console experience. The new console design is being released in a phased rollout to all regions that Elastic Beanstalk supports. It’s presently available in the following AWS Regions:

  • Beta release in US East (N. Virginia)— us-east-1

  • Asia Pacific (Sydney) — ap-southeast-2

  • Europe (Frankfurt) — eu-central-1

  • Europe (Ireland) — eu-west-1

  • South America (São Paulo) — sa-east-1

For more information, see the March 22, 2023 Release Notes in the AWS Elastic Beanstalk Release Notes guide.

To launch an environment with a sample application (console)
  1. Open the Elastic Beanstalk console, and in the Regions list, select your AWS Region.

  2. In the navigation pane, choose Applications, and then choose an existing application's name in the list or create one.

  3. On the application overview page, choose Create new environment.

    
              The application overview page with a list of application environments on the Elastic Beanstalk console

    This launches the Create environment wizard. The wizard provides a set of steps for you to create a new environment.

    
              The Create environment wizard on the Elastic Beanstalk console
  4. 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.

  5. 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.

  6. For Application code, choose Sample application.

  7. For Configuration presets, choose Single instance.

  8. Choose Next.

  9. Choose Skip to Review on the Configure service access page.

    This will select the default values for this step and skip the optional steps.

  10. 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.

  11. Choose Submit at the bottom of the page to initialize the creation of your new environment.

Next steps

After you have an environment running an application, you can deploy a new version of the application or a different application at any time. Deploying a new application version is very quick because it doesn't require provisioning or restarting Amazon EC2 instances.

After you deploy a sample application or two and are ready to start developing and running .NET Core applications locally, see Setting up your .NET Core on Linux development environment.