简体   繁体   English

AWS CodeDeploy 无权执行:codedeploy:CreateDeployment

[英]AWS CodeDeploy is not authorized to perform: codedeploy:CreateDeployment

I'm trying to do CI/CD with aws CodeDeployand and GitHub Actions from, following this tutorial .我正在尝试使用 aws CodeDeployand 和 GitHub Actions 执行 CI/CD,遵循本教程

but the following error appears when trying to create the deploy:但是尝试创建部署时出现以下错误:

An error occurred (AccessDeniedException) when calling the CreateDeployment operation: User: arn:aws:iam::***:user/church-managment-bff-s3 is not authorized to perform: codedeploy:CreateDeployment on resource: arn:aws:codedeploy:sa-east-1:***:deploymentgroup:church-managment-bff/church-managment-bff-deploy-group because no identity-based policy allows the codedeploy:CreateDeployment action
Error: Process completed with exit code 254.

I believe it's a permission problem, but I'm not able to solve it, can someone please help我相信这是一个权限问题,但我无法解决它,请有人帮忙

You have to add codedeploy:CreateDeployment permissions for church-managment-bff-s3 user.您必须为church-managment-bff-s3用户添加codedeploy:CreateDeployment权限。 You can do this as an inline policy for the user in aws console:您可以在 aws 控制台中将其作为用户的内联策略执行:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "codedeploy:CreateDeployment",
            "Resource": "*"
        }
    ]
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM