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 回答
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
专家
已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容