Amplify-cli: Amplify init says Error: Profile configuration is missing for: default

Created on 28 Mar 2019  路  4Comments  路  Source: aws-amplify/amplify-cli

$ amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project joovvappflutter
? Enter a name for the environment dev
? Choose your default editor: Sublime Text
? Choose the type of app that you're building android
Please tell us about your project
? Where is your Res directory:  app/src/main/res
Using default provider  awscloudformation
AWS access credentials can not be found.
? Setup new user No

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

? accessKeyId: **********
? secretAccessKey: ********************
? region:  us-east-1
init failed
Error: Profile configuration is missing for: default
    at Object.getProfiledAwsConfig (/Users/dev/.config/nvm/10.15.3/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/system-config-manager.js:81:11)
    at getConfiguredAwsCfnClient (/Users/dev/.config/nvm/10.15.3/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/initializer.js:65:33)
    at Object.run (/Users/dev/.config/nvm/10.15.3/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/initializer.js:15:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
$ node --version
v10.15.3
$ amplify --version
1.1.8
$ screenfetch 
                 -/+:.          dev@Devs-MacBook-Pro
                :++++.          OS: 64bit Mac OS X 10.14.4 18E226
               /+++/.           Kernel: x86_64 Darwin 18.5.0
       .:-::- .+/:-``.::-       Uptime: 12h 40m
    .:/++++++/::::/++++++/:`    Packages: 73
  .:///////////////////////:`   Shell: fish 3.0.2
  ////////////////////////`     Resolution: 2880x1800
 -+++++++++++++++++++++++`      DE: Aqua
 /++++++++++++++++++++++/       WM: Quartz Compositor
 /sssssssssssssssssssssss.      WM Theme: Blue
 :ssssssssssssssssssssssss-     CPU: Intel Core i7-4750HQ @ 2.00GHz
  osssssssssssssssssssssssso/`  GPU: Intel Iris Pro
  `syyyyyyyyyyyyyyyyyyyyyyyy+`  RAM: 8278MiB / 16384MiB
   `ossssssssssssssssssssss/
     :ooooooooooooooooooo+.
      `:+oo+/:-..-:/+o+/-

Most helpful comment

UPDATE: This can be fixed by adding the 2 files, ~/.aws/config and ~/.aws/credentials, as described by the docs here.

(The CLI points to it, but I somehow missed it, sorry.)

All 4 comments

UPDATE: This can be fixed by adding the 2 files, ~/.aws/config and ~/.aws/credentials, as described by the docs here.

(The CLI points to it, but I somehow missed it, sorry.)

Thanks it's very helpful! They didn't mention anything about them in https://aws-amplify.github.io/docs/ios/start?ref=amplify-iOS-btn...

I had the [default] profile in the ~/.aws folder. Amplify was looking for something like amplify-qCX0Z. To fix this I had to copy the default profile values to [amplify-qCX0Z].

I was missing the config file under ~/.aws, just insert the following to that file with the correct region.

[default]
region=us-west-2
output=json
Was this page helpful?
0 / 5 - 0 ratings