aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
456 stars 115 forks source link

[SOLVED]: Problem cloning repository in AWS-amplify from codeCommit #958

Closed linfiesto closed 4 years ago

linfiesto commented 4 years ago

Hi,

When cloning repository during the build process of amplify it says

2020-08-12T02:37:14.776Z [ERROR]: !!! Unable to assume specified IAM Role. Please ensure the selected IAM Role has sufficient permissions and the Trust Relationship is configured correctly. 2020-08-12T02:37:14.907Z [INFO]: # Starting environment caching... 2020-08-12T02:37:14.908Z [INFO]: # Environment caching completed Terminating logging...

I never had problem with this in my other client's AWS account. I did the standard AWS amplify-backend-console role found here. [https://docs.aws.amazon.com/amplify/latest/userguide/how-to-service-role-amplify-console.html] And I made sure my IAM user has AdministratorAccess.

image

behrooziAWS commented 4 years ago

Can you provide your app id and region so we can review the roles? I'm assuming you created the app and role in the customers account?

linfiesto commented 4 years ago

@behrooziAWS

Can you provide your app id and region so we can review the roles? I'm assuming you created the app and role in the customers account?

App ID : d2usi1y6ntza0t Region : ap-southeast-2

I'm assuming you created the app and role in the customers account? Yes, I created the app using amplify console and service role in the customer's AWS account, he has provided an account with an AdministratorAccess

linfiesto commented 4 years ago

SOLVED: To those who may have experienced similar problem just check your IAM > Access management > Account settings. Make sure you're STS permission is active for that region, in my case Asia pacific (Sydney) was inactive which was causing the error.

image

ralph-tice commented 3 years ago

@linfiesto i wouldn't mark this solved until the error message is fixed image

this error should suggest users check this STS setting for the region they're operating in

linfiesto commented 3 years ago

@ralph-tice the error message is fixed when I checked the appropriate region in the IAM STS settings. See my comment above.

ralph-tice commented 3 years ago

The error message should tell the user to check the appropriate region in the IAM STS settings, not force them to guess to look there. See my original comment and this one.

Instead of: ...click "Re-authenticate app" in General Settings...

try: ...Check that IAM STS is regionally enabled<link to IAM > Access management > Account settings>, then click "Re-authenticate app" in General Settings...

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.