0
votes

When using STS to assume a role, in the AWS SDKs (Java, for example), we have shaved valuable seconds off the operation by selecting the 'local' STS endpoint for the region our code is executing in (e.g. https://sts.eu-west-2.amazonaws.com).

Is it possible to do the same from the CLI (aws sts assume-role ...? There doesn't seem to be an option to override the default endpoint in the documentation.

1

1 Answers

1
votes

Take a look at: Activating and Deactivating AWS STS in an AWS Region and enable the region endpoint you want to connect to.

--region (string)

is common for all AWS CLI commands. Once you enable additional endpoints, you can use --region (string) to override the default endpoint.