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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南