Default region should be loaded from the AWS shared config file
calebplum opened this issue · 1 comments
I suggest that the default region should be loaded from the local AWS configuration file rather than a hardcoded value in the script. The AWS SDK handles this automatically if no region is supplied to its constructor. The SDK is already loading credentials from the shared credentials file so it should do the same for the region. I assume most people are using this script with the credentials they configured when installing the AWS CLI; this requires a default region to be set so it makes sense to use this value (which is also the same value loaded by most other tooling).
Perhaps for those edge-cases who are supplying credentials by manually setting environment variables a fallback region can be set in the script, although even in those cases I'd imagine they would be setting the AWS_REGION
environment variable as well.
You were correct.
Fixed in v2.1.0 on NPM.
Thanks.