sopel / botocross

A Python package for operating cross region AWS resources
Other
4 stars 4 forks source link

Ignore/Add cn-* region(s) #53

Closed sopel closed 10 years ago

sopel commented 10 years ago

Similar to #50, the upstream addition of region cn-north-1 within boto 2.22.0 now triggers runtime failures due to this region requiring a dedicated account.

While this issue is about cn-*right now, it confirms my hunch back then that any dedicated handling will not scale, and a region neutral handling is also confirmed as the current upstream position in https://github.com/boto/boto/issues/1951#issuecomment-31493498.

So in hindsight the include/only solution derived from the AWS Tools for Windows PowerShell turns out to be short sighted, and also inconsistent with the existing --region parameter in the first place:

  -r REGION, --region REGION
                        A region substring selector (e.g. 'us-west')

A better solution might be to expand this current substring handling to regular expressions, which would yield utmost flexibility, yet remain simple enough and explicit if so desired (e.g. (us-east-1|us-west-1)) - the default here could then just be the universally accessible ones (i.e. exclude gov and cn regions).