Search code examples
amazon-web-servicesamazon-elastic-beanstalk

How to create EC2 instance profile for AWS Elastic Beanstalk?


I understand that it requires you to create a role from the IAM dashboard which is exactly what I did. Basically My IAM role isn't visible in the drop down menu for EC2 instance. And I'm wondering what do I need to do in order to be able to select my IAM role for the EC2 instance configuration using AWS Elastic Beanstalk? It is mandatory and Elastic Beanstalk won't load without it given my knowledge. But I can't seem to figure out how to get my IAM role to load onto the drop down menu for EC2 instance profile setting in the AWS Elastic Beanstalk setup. I'm trying to host a simple website which shouldn't need much configuration, but this part is very confusing and I can't seem to get it to work properly. If you have a proper detailed process explaining this, then I'll work with that.

I have tried adding permissions to my IAM role in hopes of fixing this issue, but it didn't work at all. Now I did set Elastic Beanstalk as my use case because that's what I'm trying to use it for. Anyways, the changes to my permissions such as adding permissions for Elastic Beanstalk and I believe EC2 hasn't changed a thing.

Now others may have asked this question a long time ago. AWS has updated their UI and required additional configuration settings. The solutions are no longer the same due to the changes made by AWS. I have tried older YouTube videos and the configuration process for Elastic Beanstalk works differently now than it did previously. This is the same with many older posts due to the change of not only the UI, but also the configuration process to setup Elastic Beanstalk.


Solution

  • In order to create an IAM role that works with Elastic Beanstalk EC2 instance profile, you must either create a new role or edit the role that you're trying to use for this. The use case must be EC2 and the attached permission should be AWSElasticBeanstalkCustomPlatformForEC2. This will allow you to use this role for the EC2 instance profile for Elastic Beanstalk. This is all you need to make your IAM role work properly.