Amplify service role / PassRole / Wild Rydes tutorial

1

Hello,

On region=ap-southeast-2

I'm following the AWS tutorial to create an Amplify app:
https://aws.amazon.com/getting-started/hands-on/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-1/

I get error:
"Failed to create service role, please create a service role your self and attach to this app."

And:
Houston, there's a problem
User: arn:aws:iam::YYYYY:user/XXXX is not authorized to perform: iam:PassRole on resource: arn:aws:iam::YYYYY:role/AmplifyConsoleServiceRole-AmplifyRole

When I check the AmplifyConsoleServiceRole-AmplifyRole Trust Relationships it says:
"The following trusted entities can assume this role:
The identity provider(s) amplify.amazonaws.com"

I understand there's a concept of PassRole to Amplify based on the User's policy per:
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html

According to this the PassRole policy should be associated with a User but I don't know how to attach PassRole to a specific User.
(this also isn't documented in the tutorial so not sure if that's bad advice for setting up an Amplify app).

I'm also new to AWS so working with policies etc is new to me.

Appreciate any help you may have.

Note: After removing the AmplifyConsoleServiceRole-AmplifyRole and trying again to deploy I still get the error:
Failed to create service role, please create a service role your self and attach to this app.

And the app fails to build (just hangs there).

Update again: I've progressed it further per thread here:
https://github.com/aws-amplify/amplify-console/issues/1426

Closing out to reflect the progress.

Mark

Edited by: MarkJC on Jan 5, 2021 10:36 PM

Edited by: MarkJC on Jan 5, 2021 10:51 PM

Edited by: MarkJC on Jan 6, 2021 1:46 AM

MarkJC
asked 3 years ago624 views
2 Answers
0

Answered per post update.

MarkJC
answered 3 years ago
0

Hello,

When configuring the Amplify CLI, you can create a user with AdministratorAccess to your account to provision AWS resources for you like AppSync, Cognito etc. If not that, the please make sure that Amplify CLI requires the IAM policies mentioned in below document to function properly:

https://docs.amplify.aws/cli/usage/iam

You can grant or restrict category permissions by including or removing items from the Action section as appropriate.

AWS
answered 3 years 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.

Guidelines for Answering Questions