Account-based endpoints - Amazon SDKs and Tools
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Account-based endpoints

Account-based endpoints help ensure high performance and scalability by using your Amazon Web Services account ID to streamline the routing of Amazon Web Services service requests for services that support this feature. When you use an Amazon SDK, credential provider, and service that support account-based endpoints, the SDK will automatically construct and use an account-based endpoint rather than a regional endpoint. Account-based endpoints take the form of https://<account-id>.ddb.<region>.amazonaws.com, where <account-id> is replaced with your Amazon Web Services account ID and <region> is replaced with your Amazon Web Services Region

By default, the account ID is collected when the request is processed and used to construct an endpoint. Credential resolution also occurs when the request is processed and might change the method of endpoint resolution. Depending on what credential provider you are using, the account ID might be sourced differently.

Configure this functionality by using the following:

aws_account_id - shared Amazon config file setting
AWS_ACCOUNT_ID - environment variable
aws.accountId - JVM system property: Java/Kotlin only

The Amazon Web Services account ID. Used for account-based endpoint routing. An Amazon Web Services account ID has a format like 111122223333.

Account-based endpoint routing provides better request performance for some services.

account_id_endpoint_mode - shared Amazon config file setting
AWS_ACCOUNT_ID_ENDPOINT_MODE - environment variable
aws.accountIdEndpointMode - JVM system property: Java/Kotlin only

This setting is used to turn off account-based endpoint routing if necessary, and bypass account-based rules.

Default value: preferred

Valid values:

  • preferred – The endpoint should include account ID if available.

  • disabled – A resolved endpoint doesn't include account ID.

  • required – The endpoint must include account ID. If the account ID isn't available, the SDK throws an error.

Compatibility with Amazon SDKs

The following SDKs support the features and settings described in this topic. Any partial exceptions are noted. Any JVM system property settings are supported by the Amazon SDK for Java and the Amazon SDK for Kotlin only.

SDK Supported Released in SDK version Notes or more information
Amazon CLI v2 No
SDK for C++ No
SDK for Go V2 (1.x) Yes v1.35.0
SDK for Go 1.x (V1) No
SDK for Java 2.x Yes v2.28.4
SDK for Java 1.x Yes v1.12.771
SDK for JavaScript 3.x Yes v3.656.0
SDK for JavaScript 2.x No
SDK for Kotlin Yes v1.3.37
SDK for .NET 3.x No
SDK for PHP 3.x Yes v3.318.0
SDK for Python (Boto3) No
SDK for Ruby 3.x Yes v1.123.0
SDK for Rust No
SDK for Swift No
Tools for PowerShell No