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
已提問 3 年前檢視次數 632 次
2 個答案
0

Answered per post update.

MarkJC
已回答 3 年前
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
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南