amplify-cli: User setup fails with "Root stack creation failed: IncompleteSignature"
Describe the bug
When running amplify init, if you fail to provide the access key and secret key when choosing the set up a new user (for example, accidentally hitting “enter” without pasting the secret key first), then the next time you run amplify init and choose to not set up a new user, init fails as soon as you provide the secret key and does not ever prompt for the profile name.
To Reproduce Steps to reproduce the behavior: See above
Expected behavior Should prompt for the profile name if the create user flow failed to reach that step the first time around
Screenshots
Using default provider awscloudformation
AWS access credentials can not be detected.
? Setup new user No
For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html
? accessKeyId: REDACTED**********
? secretAccessKey: REDACTED********************
? region: us-west-2
⠋ Initializing project in the cloud...An error occurred when creating the CloudFormation stack
✖ Root stack creation failed
There’s a big IncompleteSignature error after this but I’m not sure what’s sensitive or not so I don’t want to paste it.
Desktop (please complete the following information):
- OS: [e.g. iOS] OS X
Amplify cli version: 0.1.19
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 22 (7 by maintainers)
@kaustavghosh06 I have configured
amplify configureandamplify init. It has created IAM user on the console but still when I choose profile configured with AccessID and SecretKey It gives me this error. Please help me out.Solved the issue by Verifying Account through call. I tried & failed before posting question here. Hope this will help any other person.
I think Amplify expects you to have had an existing user with AdministrationFullAccess. This should be confirmed before running
amplify initor perhaps when you run theamplify inityou will be prompted if you would be using the default AWS Profile or not. In this case you might have to create the user yourself and attach a policy to the user and paste both the access and secret keys to the respective section on the console. But when you follow the steps to create a user withamplify configureit is so easy.So when that is successful without displaying any error messages then you can proceed with the
amplify initto create a valid amplify project.amplify status: to check the validity of your Amplify project.Well that is the solution to the CloudFormation stack creation issue…
Ah, I see it now. I was able to reproduce it. I’ll mark this as a bug and we’ll work on fixing it. Thanks for pointing this out.
@mlynch It seems like you don’t have any AWS profiles set in your system and because of which its directly asking you to enter your access key and secret key. If it detected any existing profiles, it would have given you a list to choose from. Also, it looks like the accesskey and secret key provided doesn’t have the permissions/policies to execute Cloudformation operations and that might have caused the cloudformation create execution to error out.
As recommended in our documentation out here -> https://aws-amplify.github.io/media/get_started , the correct flow would be to run the
amplify configurecommand to start with, which would create an IAM user with the appropriate policies/permissions for the CLI to work with and then runamplify init. You would be able to select the newly created AWS profile (which has the appropriate policies required by the CLI) in this flow.