Create IAM Role for EC2 instance profile

Problem:

During the creation of AWS Beanstalk, at step no.9 i.e. select EC2 instance profile dropdown list, the EC2 instance profile dropdown list doesn't list any values to choose from.

Solution:

Complete the steps below i.e." Create IAM Role for EC2 instance profile" to create an IAM Role that you can subsequently select for the EC2 instance profile.


Steps:

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

  1. Choose Next.

  2. Enter a name for the role. e.g. aws-elasticbeanstalk-ec2-role-1

  3. (Optional) Add tags to the role.

  4. Choose Create role.

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

  2. Close the modal window View instance profile permissions.

    Important

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

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

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.CreateApp.html