Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to assume specified IAM Role when deploying with AWS Amplify using GitHub

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"
    }
  ]
}
like image 603
LAYOUNI Houssem Avatar asked Sep 14 '25 07:09

LAYOUNI Houssem


1 Answers

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

like image 195
heyheyhei Avatar answered Sep 17 '25 03:09

heyheyhei