Amplify-cli: ConfigError: Missing region in config

Created on 5 Sep 2018  路  8Comments  路  Source: aws-amplify/amplify-cli

Describe the bug
Error when running amplify init

To Reproduce
Steps to reproduce the behavior:

  1. amplify configure
  2. amplify init

Expected behavior
Not error

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser Firefox
  • Version [e.g. 22]

Additional context

configure

Most helpful comment

ca-central-1 missing from the region when I ran "amplify configure"

All 8 comments

@devinholloway - Thanks for reporting this issue. Which region is your profile using?

us-east-1

I double checked my ~/.aws/config, and it's properly defined region = use-east-1 under that profile

@devinholloway I know what the issue might be -> Just merged a fix for it -> https://github.com/aws-amplify/amplify-cli/pull/108 and we'll publish this version to npm by end of day today (PST).

In the meanwhile, you could Answer "No" when asked for "Use AWS Profile" and enter the access/secret key and region manually and setup your project.

Published a new version of the CLI with a fix for this to npm -> 0.1.17. Please install it and feel free to re-open the issue if the problem still persists.

Just got around to trying this out again on a new laptop, so everything is new and freshly installed, and ran into the same error.
I have amplify 0.1.27 installed.

image

@devinholloway

I was having the same issue with the "_missing region config_".
I was able to resolve it by setting the environment variable AWS_SDK_LOAD_CONFIG to a truthy value (export AWS_SDK_LOAD_CONFIG=1), as mentioned here: https://github.com/aws/aws-sdk-js/issues/1921.

I'm not sure if it's the correct fix or if they're related.

macOS High Sierra
Amplify CLI 0.1.27

ca-central-1 missing from the region when I ran "amplify configure"

I ended up needing to install the AWS CLI and run $ aws configure first w/ a secret key generated on the IAM website before $ amplify init would work.

This also generated a file in ~/.aws/config with the default region:

[default]
region = us-east-1

This likely needs to be in the docs or built into the CLI since the error message is incredibly vague for a first time user.

Was this page helpful?
0 / 5 - 0 ratings