You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to inventory AWS Gov Cloud regions using this tool, however, the tool was not recognizing US GovCloud regions of (us-gov-east-1 and us-gov-west-1).
The problem stems from get_available_regions() call on the session object. By default, it only returns AWS public regions. In order for it to return GovCloud regions (or for that matter China regions), a second argument named partition_name has to be passed in for boto3 to return GovCloud regions list.
I made the brute force change below to get this tool to work with GovCloud accounts.
Modified File: aws-inventory.py
Changed the following line from:
available_regions = frozenset(boto_session.get_available_regions(svc_name))
to:
available_regions = frozenset(boto_session.get_available_regions(svc_name, 'aws-us-gov'))
Similar type of change will be needed to inventory accounts that have resources in AWS China regions.
Thanks.
Khalid
The text was updated successfully, but these errors were encountered:
I tried to inventory AWS Gov Cloud regions using this tool, however, the tool was not recognizing US GovCloud regions of (us-gov-east-1 and us-gov-west-1).
The problem stems from get_available_regions() call on the session object. By default, it only returns AWS public regions. In order for it to return GovCloud regions (or for that matter China regions), a second argument named partition_name has to be passed in for boto3 to return GovCloud regions list.
I made the brute force change below to get this tool to work with GovCloud accounts.
Modified File: aws-inventory.py
Changed the following line from:
available_regions = frozenset(boto_session.get_available_regions(svc_name))
to:
available_regions = frozenset(boto_session.get_available_regions(svc_name, 'aws-us-gov'))
Similar type of change will be needed to inventory accounts that have resources in AWS China regions.
Thanks.
Khalid
The text was updated successfully, but these errors were encountered: