部署失败:使用AWS CodeDeploy从Bitbucket部署

时间:2018-05-30 07:42:20

标签: amazon-s3 amazon-ec2 bitbucket aws-code-deploy bitbucket-aws-code-deploy

我能够将bitbucket与aws链接,尽管bitbucket的部署会在下面返回错误。

Deployment Failed
The deployment failed because no IAM role with the IAM role name (arn:aws:iam::******:role/m30role) specified in this request was found. Make sure you are using the correct name of a service role that exists in your account. (Error code: IAM_ROLE_MISSING) Learn more

对此有何想法?或者我应该检查aws的哪个部分

有关使用AWS CodeDeploy设置从Bitbucket部署的优秀教程的任何建议。

政策

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

信任关系

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "codedeploy.amazonaws.com",
        "AWS": "arn:aws:iam::****:root"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": {
          "sts:ExternalId": "connection:****"
        }
      }
    }
  ]
}

部署配置:CodeDeployDefault.OneAtATime

从bitbucket构建(部署到AWS)已上传到s3存储桶,我能够查看所有部署历史记录,但之后所有构建都失败了。

0 个答案:

没有答案