-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for STS AssumeRole regional endpoints #1859
Comments
the standard mechanism in boto3 for using a regional endpoint is on client construction (or session) not on individual api call, ie the following should use a regional endpoint for a role assume.
|
Yes, I use that technique all the time, but got the impression from the doc I linked that the client region wouldn't override the region endpoint in this case. If you can confirm this is definitely the case, this should be good to close. |
BTW I just confirmed that a deactivated IAM region_name in my boto3.client() call still works. So it looks to me like the endpoint is not controlled by the region_name argument. |
You can provide the entire endpoint via the |
Thank you, I will test and confirm tonight. |
I didn't check the logs, but did a test with:
and it still works with that regional endpoint deactivated in IAM. |
Confirmed that using
I get the expected output (in my case I have us-west-2 disabled so I get an error as I expect):
|
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
…S calls STS used to be un-regioned, like S3, but now it is regioned. This is the one case where boto3 _does not_ do the right thing when you set the region. We have to set the region-specific endpint URL manually. This is important since the STS VPC endpoint _only_ sets a local DNS record to override the _local region's_ public STS endpoint. If we don't do this then boto3 will reach out to the _global_ https://sts.amazonaws.com URL, and that DNS entry will still point to an external IP. See this boto/boto3#1859 for more information about boto3's perverse behavior in the case of STS.
From https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts_vpce.html:
|
After specifying endpoint_url like boto3.client( |
I don't think I'm missing it, but I don't see a way to configure boto3/botocore with a regional endpoint for use with
sts.assume_role()
. I would like to investigate reducing STS latency as described in Activating and Deactivating AWS STS in an AWS Region. It appears the Java SDK provides support, and it seems Python should as well.The text was updated successfully, but these errors were encountered: