Closed leonardosul closed 6 years ago
It might be related to a Mobile Hub update. Please try again see if it's fixed now.
Thanks @UnleashedMind , seems to work fine now.
This time after an awsmobile init
i got this message:
`backend awsmobile project creation error
{ UnauthorizedException: You must first enable Mobile Hub in your account before using the service.
Visit the below address to get started:
https://console.aws.amazon.com/mobilehub/home?#/activaterole/
at Object.extractError (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/protocol/json.js:48:27)
at Request.extractError (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8)
at Request.callListeners (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.
You must enable Mobile Hub service role before using the awsmobile cli https://console.aws.amazon.com/mobilehub/home?#/activaterole/`
After following the provided link and enabling the role push and pull now works.
I create an awsmobile project locally using
awsmobile init
. I set some config likeawsmobile user-signin enable
and then try toawsmobile push
.I get an error stating that AssumeRole has failed:
{ InternalFailureException: Not authorized to perform sts:AssumeRole (Service: AWSSecurityTokenService; Status Code: 403; Error Code: AccessDenied; Request ID: 726c09fe-3d49-11e8-b0f2-c15d10264856) at Object.extractError (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/protocol/json.js:48:27) at Request.extractError (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/protocol/rest_json.js:52:8) at Request.callListeners (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/sequential_executor.js:105:20) at Request.emit (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/request.js:683:14) at Request.transition (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/state_machine.js:14:12) at /usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request.<anonymous> (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/request.js:38:9) at Request.<anonymous> (/usr/local/lib/node_modules/awsmobile-cli/node_modules/aws-sdk/lib/request.js:685:12) message: 'Not authorized to perform sts:AssumeRole (Service: AWSSecurityTokenService; Status Code: 403; Error Code: AccessDenied; Request ID: 726c09fe-3d49-11e8-b0f2-c15d10264856)', code: 'InternalFailureException', time: 2018-04-11T05:30:29.770Z, requestId: '72637ebe-3d49-11e8-9fcf-cd3fe515fd85', statusCode: 500, retryable: true }
I'm using version 1.0.21.
I haven't made any changes to my local setup that should have affected the cli. I have also tried to create a new IAM role with admin permissions but I get the same result.
To offer some context I was following this tutorial when I encountered the issue: https://github.com/richardzcode/Journal-AWS-Amplify-Tutorial