4

I was trying to deploy my application with AWS Amplify using github and I got this error :

2020-07-03T10:39:32.225Z [ERROR]: !!! Unable to assume specified IAM Role. Please ensure the selected IAM Role has sufficient permissions and the Trust Relationship is configured correctly.
2020-07-03T10:39:32.348Z [INFO]: # Starting environment caching...
2020-07-03T10:39:32.348Z [INFO]: # Environment caching completed
Terminating logging...

And this is the trust policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "amplify.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
0

2 Answers 2

3

Please ensure sts endpoint status of your region is Active. You can check in IAM > Account settings > Security Token Service (STS).

If still not work, you may try to change service endpoint in your trust policy from "amplify.amazonaws.com" to "amplify.<your-region>.amazonaws.com", which works for me. Amplify Endpoint: https://docs.aws.amazon.com/general/latest/gr/amplify.html

Sign up to request clarification or add additional context in comments.

Comments

0

This took me a while to find.

My Amplify build/deployments were failing with the error message "Unable to assume specified IAM Role". The issue was the AWS Amplify Github App lost access to my Amplify Project's GitHub Repository.

Fix: In your GitHub Org, go to Settings > GitHub Apps > AWS Amplify and choose Configure. Review the settings in the section Repository Access. In my case, I had to select the GitHub repository.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.