amplify-hosting
amplify-hosting copied to clipboard
"Unable to assume IAM Role" but really issue is repo is private
Environment information
N/A
Describe the bug
I had made a repo private, but the Amplify GitHub app has full permissions to all the repos. However, when deploying the app I kept getting the error that it was unable to assume the IAM role during build. Only when I made the repo public again did the build succeed.
Error looks like this
2025-02-13T01:47:24.337Z [ERROR]: !!! Unable to assume specified IAM Role. Please ensure the selected IAM Role has sufficient permissions and the Trust Relationship is configured correctly.
Since error is seemingly related to IAM, I was delayed in deploying client site for over an hour with updates while trying to figure out IAM issues.
Reproduction steps
- Make GitHub repo private
- Reconnect repository and ensure the Amplify app in GitHub has permission to all repos
- Try to deploy the app and it will fail during build