awslabs / aws-saas-boost

AWS SaaS Boost is a ready-to-use toolset that removes the complexity of successfully running SaaS workloads in the AWS cloud.
Apache License 2.0
961 stars 189 forks source link

Fix an issue in the install script where having no region set in the CLI errors unhelpfully. #291

Closed PoeppingT closed 2 years ago

PoeppingT commented 2 years ago

If you have no region set in the AWS CLI (doable by removing the 'region' line from .aws/config) the result of aws configure list will contain the string "" for the region, meaning the region is parsed incorrectly in the install script. This leads to an error when trying to run the installer that is potentially difficult for a new user to comprehend.

This commit changes the parsing in the install scripts to also check the configured region against the list of regions using aws ec2 describe-regions. If the configured region does not exist in that list, the installer will prompt the user to configure a valid region.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license