You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is your intention here? The normal function of boto3 is to use either the global STS endpoint or the regional endpoints (corresponding to whichever region is set on the session). Any recent version of boto3 will default to regional, but can be set to the global endpoint with the sts_regional_endpoints config value set to legacy, see here. On your boto3 Session you'd do session._session.set_config_variable('sts_regional_endpoints', 'legacy')
Is there a different URL you want to use, that you want to override the endpoint_url parameter used to create the STS client that is used to make the AssumeRole call? There's not a clean, simple way to do it that feels right to implement here. If you have need to do it, I'd suggest copying the library (it's just the one file) and then on line 212, you'd wrap botocore_session.create_client, something like making a function like this:
defget_client_creator(botocore_session, client_creator_kwargs):
defcreate_client(*args, **kwags):
kwargs.update(client_creator_kwargs) # client_creator_kwargs overrides kwargs, I am not sure if this is always the correct behaviorreturnbotocore_session.create_client(*args, **kwargs)
returncreate_client
and then line 212 would be get_client_creator(botocore_session.create_client, {"endpoint_url": "my_endpoint_url"}) and you'd alter assume_role() to take your endpoint URL as an additional parameter.
hi there, is there a way to pass endpoint_url to override sts endpoint?
The text was updated successfully, but these errors were encountered: