amplify-cli: `amplify init` always fails with `TypeError: Cannot read property 'Stacks' of null`

Describe the bug When running amplify init it always throws TypeError: Cannot read property 'Stacks' of null with no clear way to proceed or fix it.

Amplify CLI Version 4.29.4

To Reproduce

  1. Create an empty directory.
  2. Run amplify init
  3. Select ios as the type of the app.

Expected behavior amplify init succeeds.

Screenshots Screenshot 2020-10-08 at 10 06 16

Desktop (please complete the following information):

  • OS: macOS 10.15.7 (19H2)
  • Node Version: v12.19.0

Additional context This error was preceeded by https://github.com/aws-amplify/amplify-cli/issues/5509, but that one is no longer an issue for me as I don’t attempt to start amplify with npx here.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Most upvoted comments

You don’t have to configure the Amplify CLI to assume a role, it can directly use a IAM user’s credential. But you could configure it to assume a role.

From the following error message, the profile that you’ve selected is from a role with source_profile set to a user that is NOT set up to assume a role. Open the <home-dir>/.aws/config file you can see the profiles.

Is this mentioned in the Amplify “Getting started” documentation anywhere? I’m following the steps exactly as they are specified in the documentation, so my assumption is that either documentation is up to date and all the steps will succeed as described in it, or errors will be shown that will direct me and clearly state what’s wrong and how to fix it.

If you follow the instruction from the document, you will be able to set it up.

Shouldn’t this document be directly linked from the “Getting started” and “Prerequisites” sections if following that document is required to get amplify init to work?