Default Region in collect.py code
vnandyal opened this issue · comments
Note the Network Visualization functionality (command prepare
) is no longer maintained.
Code being called - collect.py
Working out of a virtualenv environment and Docker
I have a few questions regarding the default region in the collect.py code.
- What does the following code snippet do ?
default_region = os.environ.get("AWS_REGION", 'us-east-1')
if 'gov-' in default_region:
default_region = 'us-gov-west-1'
elif 'cn-' in default_region:
default_region = 'cn-north-1'
else:
default_region = 'us-east-1'
- Does the code in the snippet set the default region to us-east-1 if the other conditions are not met ?
- What if I have a default region set to us-west-1 in my aws config ? Will us-west-1 be used instead of the above ?
Can anyone respond to my queries?
Seems like it gets the environment variable 'AWS_REGION' and if its not set it makes the default region be 'us-east-1', but I am guessing.