Issue
I am learning about amplifier using below documentation https://docs.amplify.aws/angular/start/getting-started/installation/ https://docs.amplify.aws/angular/start/getting-started/setup/
But while executing "amplify init" command with required details it gives error as
UnauthorizedException.
As per 1st documentation link, successfully performed "amplify configure"
.
Then performed steps given in 2nd link for "amplify init" with below details
Project information
| Name: Amplify-App
| Environment: dev
| Default editor: Visual Studio Code
| App type: javascript
| Javascript framework: angular
| Source Directory Path: src
| Distribution Directory Path: dist
| Build Command: npm.cmd run-script build
| Start Command: ng serve
? Initialize the project with the above configuration? Yes
Using default provider awscloudformation
? Select the authentication method you want to use: AWS profile
For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
? Please choose the profile you want to use **default**
After this error is displayed as below
**We are unable to process your request. Please reach out to your support representative.**
After debugging using:
"amplify init --debug" below UnauthorizedException error is displayed
ProjectInitFault: We are unable to process your request. Please reach out to your support representative.
at init (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify\amplify-provider-awscloudformation\lib\amplify-service-manager.js:163:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.run (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify\amplify-provider-awscloudformation\lib\initializer.js:96:9)
We are unable to process your request. Please reach out to your support representative.
UnauthorizedException: We are unable to process your request. Please reach out to your support representative.
at Object.extractError (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\protocol\json.js:80:27)
at Request.extractError (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\protocol\rest_json.js:61:8)
at Request.callListeners (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\sequential_executor.js:106:20)
at Request.emit (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
at Request.emit (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:686:14)
at Request.transition (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\state_machine.js:14:12)
at C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:38:9)
at Request.<anonymous> (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:688:12)
at Request.callListeners (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\sequential_executor.js:116:18)
at Request.emit (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
at Request.emit (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:686:14)
at Request.transition (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\state_machine.js:14:12)
at C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:38:9)
at Request.<anonymous> (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\request.js:688:12)
at Request.callListeners (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\sequential_executor.js:116:18)
at callNextListener (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\sequential_executor.js:96:12)
at IncomingMessage.onEnd (C:\snapshot\amplify-cli\build\node_modules\aws-sdk\lib\event_listeners.js:417:13)
at IncomingMessage.emit (node:events:525:35)
at IncomingMessage.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
I checked access key and secret key stored in C:/Users/user/.aws/credentials file and keys are same as generated while creating IAM User.
How to debug further to resolve above issue?
Solution
I reported issue in AWS Support Center. As per instructions given by support center I did following
- Changed root user password and also implemented MFA.
- Checked CloudTrail logs for any unusual activity. In my case there is not logs present.
- Checked unauthorized access (if any) in Billing section. There is no unauthorized access.
"amplify init" is started working after performing Step 1.
Answered By - Ash
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.