Creating an Elastic Beanstalk environment - AWS Elastic Beanstalk

Creating an Elastic Beanstalk environment

An AWS Elastic Beanstalk environment is a collection of AWS resources running an application version. You can deploy multiple environments when you need to run multiple versions of an application. For example, you might have development, integration, and production environments.

The following procedure launches a new environment running the default application. These steps are simplified to get your environment up and running quickly, using default option values. For detailed instructions with descriptions of the many options you can use to configure the resources that Elastic Beanstalk deploys on your behalf, see The create new environment wizard.

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.


    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.


    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. The Configure service access page displays.

    Configure service access
  10. Choose Use an existing service role for Service Role.

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

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

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

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

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

Configure service access
To create a an IAM Role for EC2 instance profile selection
  1. 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.

  2. Choose the IAM console link displayed at the top of the window.

  3. In the IAM console navigation pane, choose Roles.

  4. Choose Create role.

  5. Under Trusted entity type, choose AWS service.

  6. Under Use case, choose EC2.

  7. Choose Next.

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

  9. Choose Next.

  10. Enter a name for the role.

  11. (Optional) Add tags to the role.

  12. Choose Create role.

  13. Return to the Elastic Beanstalk console window that is open.

  14. Close the modal window View instance profile permissions.


    Do not close the browser page that displays the Elastic Beanstalk console.

  15. Choose refresh icon (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.

While Elastic Beanstalk creates your environment, you are redirected to the Elastic Beanstalk console. When the environment health turns green, choose the URL next to the environment name to view the running application. This URL is generally accessible from the internet unless you configure your environment to use a custom VPC with an internal load balancer.