JohannesEbke / aws_list_all

List all your AWS resources, all regions, all services.
MIT License
413 stars 97 forks source link

Support for GovCloud Regions #48

Open gregwalters opened 3 years ago

gregwalters commented 3 years ago

It would be nice if the us-gov-west-1 and us-gov-east-1 regions were supported.

When running a query against a gov region:

$ aws-list-all query --directory aws_inventory --region us-gov-west-1 --service ec2 -v -v
Increasing the open connection limit "nofile" from 256 to 6000.

Building set of queries to execute...
...done. Executing queries...
...done

Expected results would be queries running against the region instead of no queries ran.

JohannesEbke commented 3 years ago

Hi @gregwalters , thanks for the report! Currently, aws_list_all is not "partition-aware", so get_available_regions defalts to the "aws" partition, see the code at

https://boto3.amazonaws.com/v1/documentation/api/latest/_modules/boto3/session.html#Session.get_available_regions

This is going to be interesting, as I do not have access to any other partition rather than "aws". I'd very much like to put in the code, but it would be most useful if someone could test it afterwards. @gregwalters , would you be up for that?

gregwalters commented 3 years ago

Yeah, I'm totally happy to help you test!