Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amplify init fails with "Error: Invalid configuration settings" #4128

Closed
steinybot opened this issue Apr 30, 2020 · 7 comments · Fixed by #6986
Closed

amplify init fails with "Error: Invalid configuration settings" #4128

steinybot opened this issue Apr 30, 2020 · 7 comments · Fixed by #6986
Assignees
Labels
feature-request Request a new feature good first issue Good for newcomers platform Issues tied to the general CLI platform

Comments

@steinybot
Copy link

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Describe the bug

amplify init fails with Error: Invalid configuration settings.

Amplify CLI Version

4.18.1

To Reproduce

❯ amplify init
Scanning for plugins...
Plugin scan successful
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project CommUnity
? Enter a name for the environment prod
? Choose your default editor: IntelliJ IDEA
? Choose the type of app that you're building javascript
Please tell us about your project
? What javascript framework are you using react
? Source Directory Path:  src
? Distribution Directory Path: build
? Build Command:  npm run-script build
? Start Command: npm run-script start
Using default provider  awscloudformation

For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

? Do you want to use an AWS profile? No
? accessKeyId:  ********************
? secretAccessKey:  ************************
? region:  ap-southeast-2
init failed
Error: Invalid configuration settings
    at initialize (/Users/jason/.nvm/versions/node/v14.1.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/configuration-manager.js:151:11)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at carryOutConfigAction (/Users/jason/.nvm/versions/node/v14.1.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/configuration-manager.js:122:16)
    at Object.init (/Users/jason/.nvm/versions/node/v14.1.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/configuration-manager.js:30:10)
    at Object.run (/Users/jason/.nvm/versions/node/v14.1.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/initializer.js:15:3)

Expected behavior

It should not fail.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS
  • Node Version: v14.1.0

Additional context

I have no AWS environment variables set.

@ammarkarachi ammarkarachi added pending-triage Issue is pending triage platform Issues tied to the general CLI platform labels Apr 30, 2020
@ammarkarachi
Copy link
Contributor

@steinybot Can you verify if your accessKeyId/secretAccessKey match the ones your provisioned in the console?

@steinybot
Copy link
Author

Ok so I thought that the prompt for accessKeyId/secretAccessKey saying [hidden] meant that it was using the ones from my default profile in ~/.aws/credentials. If I press enter without typing anything then that reproduces the error. If I put credentials in there then it works (well it fails with the next error but at least that error has an error that I can understand).

So this is a user error but I think it should:

  1. Use the values from the default profile in ~/.aws/credentials if you don't type anything.
  2. Re-prompt if you press enter without typing anything and there is no ~/.aws/credentials.
  3. Have a better error message saying what the invalid configuration setting actually is.

@ammarkarachi
Copy link
Contributor

? Do you want to use an AWS profile? Yes will give you the ability to select your profile from aws/credential but yes there is room for improvement in the workflow I will mark it as an enhancement.

@ammarkarachi ammarkarachi added enhancement and removed pending-triage Issue is pending triage labels Apr 30, 2020
@ammarkarachi ammarkarachi added the good first issue Good for newcomers label Jun 4, 2020
@agileurbanite
Copy link

👍 I ran into this issue as well, it wasn't obvious as I thought it would take my default profile as @steinybot mentioned

@gitaalekhyapaul
Copy link
Contributor

@ammarkarachi I would like to tackle this enhancement issue.

@ignazio21
Copy link

I also get the same error. In my case, I pass env variables for the AWS creds
Screenshot 2021-03-30 at 19 19 54

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2021
@josefaidt josefaidt added feature-request Request a new feature and removed enhancement labels Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request a new feature good first issue Good for newcomers platform Issues tied to the general CLI platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants