For help in understanding the layout of settings pages, or in interpreting theSupport by AWS SDKs and tools table that follows, seeUnderstanding the settings pages of this guide.
Service-specific endpoint configuration provides the option to use an endpoint of your choosing for API requests and to have that choice persist. These settings provide flexibility to support local endpoints, VPC endpoints, and third-party local AWS development environments. Different endpoints can be used for testing and production environments. You can specify an endpoint URL for individual AWS services.
Configure this functionality by using the following:
endpoint_url - shared AWSconfig file settingAWS_ENDPOINT_URL - environment variableaws.endpointUrl - JVM system property: Java/Kotlin onlyWhen specified directly within a profile or as an environment variable, this setting specifies the endpoint that is used for all service requests. This endpoint is overridden by any configured service-specific endpoint.
You can also use this setting within aservices section of a shared AWSconfig file to set a custom endpoint for a specific service. For a list of all service identifier keys to use for subsections within theservices section, seeIdentifiers for service-specific endpoints.
Default value:none
Valid values: A URL including the scheme and host for the endpoint. The URL can optionally contain a path component that contains one or more path segments.
AWS_ENDPOINT_URL_<SERVICE> - environment variableaws.endpointUrl<ServiceName> - JVM system property: Java/Kotlin onlyAWS_ENDPOINT_URL_<SERVICE>, where<SERVICE> is the AWS service identifier, sets a custom endpoint for a specific service. For a list of all service-specific environment variables, seeIdentifiers for service-specific endpoints.
This service-specific endpoint overrides any global endpoint set inAWS_ENDPOINT_URL.
Default value:none
Valid values: A URL including the scheme and host for the endpoint. The URL can optionally contain a path component that contains one or more path segments.
ignore_configured_endpoint_urls - shared AWSconfig file settingAWS_IGNORE_CONFIGURED_ENDPOINT_URLS - environment variableaws.ignoreConfiguredEndpointUrls - JVM system property: Java/Kotlin onlyThis setting is used to ignore all custom endpoints configurations.
Note that any explicit endpoint set in the code or on a service client itself is used regardless of this setting. For example, including the--endpoint-url command line parameter with an AWS CLI command or passing an endpoint URL into a client constructor will always take effect.
Default value:false
Valid values:
true – The SDK or tool does not read any custom configuration options from the sharedconfig file or from environment variables for setting an endpoint URL.
false – The SDK or tool uses any available user-provided endpoints from the sharedconfig file or from environment variables.
To route requests for all services to a custom endpoint URL, set theAWS_ENDPOINT_URL global environment variable.
export AWS_ENDPOINT_URL=http://localhost:4567To route requests for a specific AWS service to a custom endpoint URL, use theAWS_ENDPOINT_URL_<SERVICE> environment variable. Amazon DynamoDB has aserviceId ofDynamoDB. For this service, the endpoint URL environment variable isAWS_ENDPOINT_URL_DYNAMODB. This endpoint takes precedence over the global endpoint set inAWS_ENDPOINT_URL for this service.
export AWS_ENDPOINT_URL_DYNAMODB=http://localhost:5678 As another example, AWS Elastic Beanstalk has aserviceId ofElastic Beanstalk. The AWS service identifier is based on the API model'sserviceId by replacing all spaces with underscores and uppercasing all letters. To set the endpoint for this service, the corresponding environment variable isAWS_ENDPOINT_URL_ELASTIC_BEANSTALK. For a list of all service-specific environment variables, seeIdentifiers for service-specific endpoints.
export AWS_ENDPOINT_URL_ELASTIC_BEANSTALK=http://localhost:5567config fileIn the sharedconfig file,endpoint_url is used in different places for different functionality.
endpoint_url specified directly within aprofile makes that endpoint the global endpoint.
endpoint_url nested under a service identifier key within aservices section makes that endpoint apply to requests made only to that service. For details on defining aservices section in your sharedconfig file, seeFormat of the config file.
The following example uses aservices definition to configure a service-specific endpoint URL to be used for Amazon S3 and a custom global endpoint to be used for all other services:
[profiledev-s3-specific-and-global]endpoint_url =http://localhost:1234services =s3-specific[servicess3-specific]s3 = endpoint_url =https://play.min.io:9000A single profile can configure endpoints for multiple services. This example shows how to set the service-specific endpoint URLs for Amazon S3 and AWS Elastic Beanstalk in the same profile. AWS Elastic Beanstalk has aserviceId ofElastic Beanstalk. The AWS service identifier is based on the API model'sserviceId by replacing all spaces with underscores and lowercasing all letters. Thus, the service identifier key becomeselastic_beanstalk and settings for this service begin on the lineelastic_beanstalk =. For a list of all service identifier keys to use in theservices section, seeIdentifiers for service-specific endpoints.
[servicestesting-s3-and-eb]s3 = endpoint_url =http://localhost:4567elastic_beanstalk = endpoint_url =http://localhost:8000[profiledev]services =testing-s3-and-ebThe service configuration section can be used from multiple profiles. For example, two profiles can use the sameservices definition while altering other profile properties:
[servicestesting-s3]s3 = endpoint_url =https://localhost:4567[profiletesting-json]output = jsonservices =testing-s3[profiletesting-text]output = textservices =testing-s3If your profile has role-based credentials configured through asource_profile parameter for IAM assume role functionality, the SDK only uses service configurations for the specified profile. It does not use profiles that are role chained to it. For example, using the following sharedconfig file:
[profileA]credential_source =Ec2InstanceMetadataendpoint_url =https://profile-a-endpoint.aws/[profileB]source_profile =Arole_arn =arn:aws:iam::123456789012:role/roleBservices =profileB[servicesprofileB]ec2 = endpoint_url =https://profile-b-ec2-endpoint.aws If you use profileB and make a call in your code to Amazon EC2, the endpoint resolves ashttps://profile-b-ec2-endpoint.aws. If your code makes a request to any other service, the endpoint resolution will not follow any custom logic. The endpoint does not resolve to the global endpoint defined in profileA. For a global endpoint to take effect for profileB, you would need to setendpoint_url directly within profileB. For more information on thesource_profile setting, seeAssume role credential provider.
The settings for this feature can be used at the same time but only one value will take priority per service. For API calls made to a given AWS service, the following order is used to select a value:
Any explicit setting set in the code or on a service client itself takes precedence over anything else.
For the AWS CLI, this is the value provided by the--endpoint-url command line parameter. For an SDK, explicit assignments can take the form of a parameter that you set when you instantiate an AWS service client or configuration object.
The value provided by a service-specific environment variable such asAWS_ENDPOINT_URL_DYNAMODB.
The value provided by theAWS_ENDPOINT_URL global endpoint environment variable.
The value provided by theendpoint_url setting nested under a service identifier key within aservices section of the sharedconfig file.
The value provided by theendpoint_url setting specified directly within aprofile of the sharedconfig file.
Any default endpoint URL for the respective AWS service is used last.
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++ | No | |
| SDK for Go V2 (1.x) | Yes | |
| SDK for Go 1.x (V1) | No | |
| SDK for Java 2.x | Yes | |
| SDK for Java 1.x | No | |
| SDK for JavaScript 3.x | Yes | |
| SDK for JavaScript 2.x | No | |
| SDK for Kotlin | Yes | |
| SDK for .NET 4.x | 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 | Yes | |
| SDK for Swift | Yes | |
| Tools for PowerShell V5 | Yes | |
| Tools for PowerShell V4 | Yes |