not give you permission to perform operations in the following AWS service: AmazonAutoScaling.

0

CodeDeploy>Deployments Blue-green deployment error: "The IAM role arn:aws:iam::1**********************:role/CodeDeployServiceRole does not give you permission to perform operations in the following AWS service: AmazonAutoScaling. Contact your AWS administrator if you need help. If you are an AWS administrator, you can grant permissions to your users or groups by creating IAM policies.”

Environment configuration of deployment group select Automatically copy Amazon EC2 Auto Scaling I didn't have this problem when using Launch configuration before, but now I have permission issues when using Launch template, and it doesn't help that I configured the auto scaling permissions for the role.

I don't know what the problem is, is there any solution?

1 Answer
2

According to document from AWS [1], you will be needed to grant these permissions below:

  1. EC2:RunInstances
  2. EC2:CreateTags
  3. iam:PassRole

Please refer to the statement below from the document: Deployments that use an Auto Scaling group created with a launch template require the following permissions. These are in addition to the permissions granted by the AWSCodeDeployRole AWS managed policy.

Therefore, you need to check If you granted 3 permissions to the IAM role 'CodeDeployServiceRole':

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "DeployWithASGCreatedWithLT",
            "Effect": "Allow",
            "Action": [
                "iam:PassRole",
                "ec2:CreateTags",
                "ec2:RunInstances"
            ],
            "Resource": "*"
        }
    ]
}

I hope above I shared helps, please tell me If you have any additional questions.

[1] Troubleshoot Amazon EC2 Auto Scaling issues - "CodeDeployRole does not give you permission to perform operations in the following AWS service: AmazonAutoScaling" error https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-auto-scaling.html#troubleshooting-auto-scaling-permissions-error

profile picture
EXPERT
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions