dsnap icon indicating copy to clipboard operation
dsnap copied to clipboard

Default --region should come from the profile

Open tbooth opened this issue 2 years ago • 1 comments

If no --region is specified on the command line the default is hard coded to 'us-east-1'. The region set in the profile is ignored, and also the standard AWS_DEFAULT_REGION environment variable is ignored.

Given that the default behaviour of calling boto3.session.Session(region_name=None) is to respect both these settings, this would be a more logical default.

Thanks for maintaining dsnap!

tbooth avatar Oct 21 '22 10:10 tbooth

Thanks! Agreed, None should have be the default here. I think we'll just want to update the major version when we do this just because I think it can fail if the region isn't set in ~/.aws/config.

Note to self: us-east-1 is set as the default in a few places across the code.

RyanJarv avatar Oct 27 '22 22:10 RyanJarv