Skip to content

Amplify Error - Unable to assume IAM Role

0

Has anyone encountered the amplify error log on IAM roles? We have verified that my group/users have the correct permission but we are still unable to deploy into our deployment branch due to this error.

1 - 2025-06-18T04:26:17.664Z [ERROR]: !!! Unable to assume specified IAM Role. Please ensure the selected IAM Role has sufficient permissions and the Trust Relationship is configured correctly.

2 - 2025-06-18T04:26:17.665Z [INFO]: # Starting environment caching...

3 - 2025-06-18T04:26:17.665Z [INFO]: # Environment caching completed

3 Answers
0

This error occurs when AWS Amplify is unable to assume the IAM role specified for your deployment. To resolve this issue, you need to check several aspects of your IAM configuration:

  1. Verify the trust relationship policy of the IAM role you're using for Amplify. The trust policy should include both the regional Amplify service and the general Amplify service. Your trust policy should look similar to:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": ["amplify.YOUR-REGION.amazonaws.com", "amplify.amazonaws.com"]
},
"Action": "sts:AssumeRole"
}
]
}
  1. Ensure that the IAM role has the necessary permissions attached. Typically, roles used with Amplify should have policies like AdministratorAccess and AdministratorAccess-Amplify.

  2. Check for any inline policies that might be restricting access.

  3. Verify that all AWS resources related to your Amplify app are in the same region.

  4. Review your CloudTrail logs for any denied API calls related to AssumeRole actions.

  5. Ensure that the IAM user or role you're using has permission to call sts:AssumeRole for the role that Amplify needs to assume.

This issue can sometimes occur even if configurations appear correct, especially after recent changes to your application or AWS environment. If the problem persists after checking these items, you might need to invalidate the cache or deploy a fresh version of the app.
Sources
Unable to Assume IAM Role in AWS Amplify Deployment | AWS re:Post
on amplify react app deploy issue | AWS re:Post
"mcurrent credentials could not be used to assume *** role" error during amolify deployment | AWS re:Post
Troubleshoot IAM roles - AWS Identity and Access Management

answered a year ago

AWS
SUPPORT ENGINEER

reviewed a year ago

0

The error is about why amplify cannot assume the role and it's not referring to your user permissions. Agreed with repost's solution around trust policy.

EXPERT

answered a year ago

0

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.

My Fix: In 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 re-add the repository.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.