I`m trying to deploy a django project to AWS Beanstalk following this tutorial. I executed
eb create
and after a while I get the error
The instance profile aws-elasticbeanstalk-ec2-role associated with the environment does not exist.
I`m new to the Amazon cloud and can not interprete this error. Can somebody help me?
That role is created the first time you use the elastic beanstalk console. The CLI also attempts to create it, but your IAM user doesn't have permissions to create it. You can fix this error by logging in to the console and getting to the platform selection page. You will notice that it will ask you to create a role.
Otherwise, you can give your IAM user create role permissions and the CLI will create the role for you.
You can check one option that works here for AWS Beanstalk. This is using AWS Console.
Similarly, it should work for AWS CLI and AWS SDK as well. Key here is the instance profile role you select for EC2 (or say instance IAM role/instance profile) during Beanstalk Environment creation.
You can create customer managed policy extending or reusing AWSElasticBeanstalkFullAccess policy based on need. Refer AWSElasticBeanstalkFullAccess to understand it better. Also, check out some more AWS Managed policies starting with AWSElasticBeanStalk*.
Somehow default aws-elasticbeanstalk-ec2-role policy is not working/taking effect as desired for me. I am getting same error message as reported above if I go with default policy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With