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

aws-mfa hitting to "https://sts.amazonaws.com/" instead of "https://sts.<region>.amazonaws.com/"

Open Ankits19 opened this issue 2 years ago • 3 comments

I am using aws-mfa.

When i run aws-mfa with profile name with long-term credentials in my ~/.aws/credentials, it is always reaching to https://sts.amazonaws.com as my machine is in private network so not able to resolve it and failing to have temporary creds in my file.

image

Ankits19 avatar Sep 07 '22 10:09 Ankits19

You have to create an environment variable with the following: AWS_STS_REGIONAL_ENDPOINTS='regional'

DanielMcAssey avatar Oct 31 '22 15:10 DanielMcAssey

Hi, even after adding this it is still going to the global endpoint instead of REGIONAL. If i remember correctly I tried this earlier as well.

image

Ankits19 avatar Nov 22 '22 05:11 Ankits19

Adding "sts_regional_endpoints = regional" in ~/.aws/config file, worked but will it should not be created by aws-mfa? because what we create profile is default-long-term.

image

Ankits19 avatar Nov 22 '22 05:11 Ankits19