aws-mfa icon indicating copy to clipboard operation
aws-mfa copied to clipboard

Added region as a parameter for aws-mfa.

Open shantanugupta opened this issue 1 year ago • 3 comments

Regarding the issue(https://github.com/broamski/aws-mfa/issues/76), I changed the code. Since I tested when calling sts API without region vs with region. Boto3 resolved to the correct API endpoint when the region was passed. So I made the change to the code to make the package accept region as an additional parameter.

Assumption: .aws/credentials file should contain the region as a required parameter.

shantanugupta avatar Jun 08 '22 05:06 shantanugupta

Please allow this to merge into the repo. I too had this issue for govcloud

abrockmeyer-govtact avatar Jul 27 '23 21:07 abrockmeyer-govtact

This is also needed to work with S3 Multi Region Access Points, which don't work with temporary credentials from the global STS endpoint. https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html

hmoffatt avatar Aug 17 '23 06:08 hmoffatt

The commit here is not enough, you must also set the endpoint_url when creating the client. See https://github.com/broamski/aws-mfa/pull/52 which has it working.

hmoffatt avatar Aug 17 '23 06:08 hmoffatt