Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Region in collect.py code #935

Open
vnandyal opened this issue Nov 14, 2022 · 2 comments
Open

Default Region in collect.py code #935

vnandyal opened this issue Nov 14, 2022 · 2 comments

Comments

@vnandyal
Copy link

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.

  1. 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'
  1. Does the code in the snippet set the default region to us-east-1 if the other conditions are not met ?
  2. 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 ?
@vnandyal
Copy link
Author

Can anyone respond to my queries?

@veritasecops
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants