Amplify Init Error - ✖ Root stack creation failed init failed TypeError: Cannot redefine property: default

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.

Solution 1:

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!