Endpoint discovery - AWS SDKs and Tools

Endpoint discovery

SDKs use endpoint discovery to access service endpoints (URLs to access various resources), while still maintaining flexibility for AWS to alter URLs as needed. This way, your code can automatically detect new endpoints. There are no fixed endpoints for some services. Instead, you get the available endpoints during runtime by making a request to get the endpoints first. After retrieving the available endpoints, the code then uses the endpoint to access other operations. For example, for Amazon Timestream, the SDK makes a DescribeEndpoints request to retrieve the available endpoints, and then uses those endpoints to complete specific operations such as CreateDatabase or CreateTable.

Endpoint discovery is required in some services and optional in others. It defaults to either true or false depending on whether the service requires endpoint discovery. For example, Timestream defaults to true, and Amazon DynamoDB defaults to false. For services where endpoint discovery is not required, endpoint discovery is not enabled. Instead, configuration options are available through environment variables, the shared AWS config file, or SDK code constructs (for example, configuration classes). For operations where endpoint discovery is required, the SDK automatically attempts to discover an endpoint.

Configure this functionality by using the following:

endpoint_discovery_enabled - shared AWS config file setting
AWS_ENABLE_ENDPOINT_DISCOVERY - environment variable
aws.endpointDiscoveryEnabled - JVM system property: Java/Kotlin only
To configure value directly in code, consult your specific SDK directly.

Enables/disables endpoint discovery for services where endpoint discovery is optional. Endpoint discovery is required in some services.

Default value: false

Valid values:

  • true – The SDK should automatically attempt to discover an endpoint for services where endpoint discovery is optional.

  • false – The SDK should not automatically attempt to discover an endpoint for services where endpoint discovery is optional.

Compatibility with AWS 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 AWS SDK for Java and the AWS SDK for Kotlin only.

SDK Supported Notes or more information
AWS CLI v2 Yes
SDK for C++ Yes
SDK for Go V2 (1.x) Yes
SDK for Go 1.x (V1) Yes To use shared config file settings, you must turn on loading from the config file; see Sessions.
SDK for Java 2.x Yes The SDK for Java 2.x uses AWS_ENDPOINT_DISCOVERY_ENABLED for the environment variable name.
SDK for Java 1.x Yes
SDK for JavaScript 3.x Yes
SDK for JavaScript 2.x Yes
SDK for Kotlin Yes
SDK for .NET 3.x Yes
SDK for PHP 3.x Yes
SDK for Python (Boto3) Yes
SDK for Ruby 3.x Yes
SDK for Rust Partial Supported for Timestream only.
Tools for PowerShell Yes