Use Amazon account-based endpoints with DynamoDB - Amazon SDK for JavaScript
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).

The Amazon SDK for JavaScript V3 API Reference Guide describes in detail all the API operations for the Amazon SDK for JavaScript version 3 (V3).

Use Amazon account-based endpoints with DynamoDB

DynamoDB offers Amazon account-based endpoints that can improve performance by using your Amazon account ID to streamline request routing.

To take advantage of this feature, you need to use version 3.656.0 or greater of Amazon SDK for JavaScript version 3. This account-based endpoints feature is enabled by default in this new version.

If you want to opt out of the account-based routing, you have the following options:

  • Configure a DynamoDB service client with the accountIdEndpointMode parameter set to disabled.

  • Set the environment variable AWS_ACCOUNT_ID_ENDPOINT_MODE to disabled.

  • Update the shared Amazon config file setting account_id_endpoint_mode to disabled.

The following snippet is an example of how to disable account-based routing by configuring a DynamoDB service client:

const ddbClient = new DynamoDBClient({ region: "us-west-2", accountIdEndpointMode: "disabled" // Disable account ID in the endpoint });

The Amazon SDKs and Tools Reference Guide provides more information on the other configuration options.