- Newest
- Most votes
- Most comments
To resolve the "elasticbeanstalk:CreateApplicationVersion permission error" in your pipeline deploy stage, you need to ensure that the IAM role associated with your CodePipeline has the necessary permissions. Here are the steps to fix this issue:
-
Open the AWS Management Console and navigate to the IAM service.
-
Locate the service role used by your CodePipeline. This is typically named something like "CodePipelineServiceRole".
-
Select the role and go to the "Permissions" tab.
-
Click on "Add permissions" and then "Create inline policy".
-
In the policy editor, add the following JSON:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "elasticbeanstalk:CreateApplicationVersion", "Resource": "*" } ] }
-
Name the policy (e.g., "ElasticBeanstalkCreateAppVersion") and save it.
-
Additionally, ensure that your role has the necessary permissions for other Elastic Beanstalk operations. You can add the following managed policies if they're not already attached:
- AWSElasticBeanstalkFullAccess
- AWSCodePipelineFullAccess
-
If you're still encountering issues, you may need to update the service role for CodePipeline. The service role might have been created before August 6, 2015, when AWS updated the required permissions. To do this:
a. In the IAM console, find your CodePipeline service role. b. Edit the role's policy statement to include the following permissions:
{ "Effect": "Allow", "Action": [ "elasticbeanstalk:", "ec2:", "elasticloadbalancing:", "autoscaling:", "cloudwatch:", "s3:", "sns:", "cloudformation:", "rds:", "sqs:", "ecs:" ], "Resource": "" }
-
After making these changes, save the updated policy.
-
Return to your CodePipeline and manually rerun the pipeline to see if the error is resolved.
Remember to follow the principle of least privilege and adjust the permissions as necessary for your specific use case. If you're still experiencing issues after these steps, you may need to review your pipeline configuration or consult AWS support for further assistance.
Sources
Troubleshooting CodePipeline - AWS CodePipeline
How do I troubleshoot when User: arn is no authorized to perform Create * or Delete * or Update * on resource(s) because no identity- policy allows the actions | AWS re:Post
Relevant content
- asked 2 years ago