ITADN

Fix role policy support for AWS GovCloud

#562Pull Requestmccahan 创建于 2025-06-17
M
mccahancommented
This resolves a "ServiceError - Invalid ARN partition" failure when running `eb create` on an AWS GovCloud account. *Description of changes:* AWS GovCloud stores its policies under a [separate partition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html#arns-syntax), `arn-us-gov`. For example, the `AWSElasticBeanstalkWebTier` policy ARN is `arn:aws-us-gov:iam::aws:policy/AWSElasticBeanstalkWebTier`. ![image](https://github.com/user-attachments/assets/c1798c5f-d5a6-4dbe-85cd-9bc04812e948) Previously, when running an `eb create` I would receive a `ServiceError - Invalid ARN partition` message because of the incorrect policy name as it goes to attach the policy to the EC2 role. Adding a special case for regions like e.g. `us-gov-east-1` resolves the issue and the command completes successfully. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
合并状态:未合并 0 条评论