I am getting this error when trying to create an Elastic Beanstalk
environment:
"the instance profile aws-elasticbeanstalk-ec2-role associated with
the environment does not exist."
I am just trying to create a simple web space with PHP
and MySQL
and I choose all the default settings when setting up the environment.
How can I fix the problem?
2
Answers
When creating an environment in eb, you need two roles (service and instance profile role). Apparently the instance profile role is not being created automatically. So you need to go to IAM and create a role called aws-elasticbeanstalk-ec2-role with the following policies: AWSElasticBeanstalkWorkerTier and AWSElasticBeanstalkMulticontainerDocker
source: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-roles-instance.html
Due to the security policies of AWS, Elastic Beanstalk does not create instance profile role automatically now for new accounts. You need to manually create an instance profile and add the managed policies of AWSElasticBeanstalkWebTier in it.