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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠