Deployment Failed: Deploy From Bitbucket Using AWS CodeDeploy

540 views Asked by At

I was able link bitbucket with aws although the deployment from bitbucket returns an error below.

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

Any idea about this? Or which part of aws should I check

Any recommendation for a good tutorial on setting up Deploy From Bitbucket Using AWS CodeDeploy.

policy

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

trust relationship

{
  "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:****"
        }
      }
    }
  ]
}

Deployment configuration: CodeDeployDefault.OneAtATime


Builds from bitbucket (Deploy to AWS) were uploaded to s3 buckets and I was able to see all the deployments history but then again all builds were failed.

0

There are 0 answers