3
votes

Using amplify init, right after choosing which profile to use, I get this error and am not sure why: ✖ Root stack creation failed init failed TypeError: Cannot redefine property: default

  • I tried changing the different user to be my default in my credentials file and then picking the default profile in the amplify init step for that - same error.
  • I tried saying I didn't want to use a profile and instead putting in my access key id and secret key in manually, also didn't work.
2

2 Answers

5
votes

Found solution here! github issues

Relevant quote - "I found the source of my problem... My ~/.aws/config file contained entries called [default] and [profile default], which causes the symptom."

So I removed the [default] and just left my [profile default] and then the amplify init went through normally!

0
votes

Amplify expects you to have had an existing user with AdministrationFullAccess. This should be confirmed before running amplify init or perhaps when you run the amplify init you 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 with amplify configure it is so easy.