Fix AWS GovCloud with AWS S3 cache

What does this MR do?

Previously when an IAM profile were used, the S3 cache adapter created an inline policy scoped to an object with a ARN prefix of arn:aws:s3. However, as described in https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html, GovCloud and China endpoints use the aws-us-gov and aws-cn partitions, respectively.

Fix this by using the right partition based on the given region.

Relates to #38834 (closed)

Changelog: fixed

Why was this MR needed?

What's the best way to test this MR?

What are the relevant issue numbers?

Edited by Stan Hu

Merge request reports

Loading