I used CodePipeline to integrate my GitHub Repo and encountered an error when I tried to deploy my Flask application using AWS Elastic Beanstalk.
I tried to find the error and I got to know that my environment didn't even launch. enter image description here
The issue arises due to the security policies of AWS, which prevents Elastic Beanstalk from creating it's own instance profile. Now, an instance profile is required for an environment because it provides the necessary permissions and access rights to the EC2 instances that run your application.
Steps to manually create an instance profile:
[create a Role]
[link Role to the User using the user ARN we just created]
[Create a new environment]
[We have successfully launched an environment]