Netflix-Skunkworks / aardvark

Aardvark is a multi-account AWS IAM Access Advisor API
Apache License 2.0
472 stars 77 forks source link

AWS GovCloud Support #105

Closed arhea closed 4 years ago

arhea commented 4 years ago

Issue: When using GovCloud or other AWS partitions the role generated via the role name has an invalid ARN. For example, when using us-gov-east-1 it generates the following:

arn:aws:iam::<account id>:role/Aardvark

which should be:

arn:aws-us-gov:iam::<account id>:role/Aardvark

This pull request adds a new configuration item to the config.py called ARN_PARTITION. By default ARN_PARTITION is set to aws to maintain backwards compatibility. This can be overridden with aws-us-gov to generate proper ARNs in those regions.