Skip to content

Conversation

@RanVaknin
Copy link
Contributor

@RanVaknin RanVaknin commented Mar 10, 2025

Motivation and Context

Support for service-specific endpoint overrides in the Java SDK was introduced in a #5562 , allowing services to resolve endpoints from environment variables and system properties.
However, service-specific overrides from [services] section of the config file was not supported. Called out in #5779.

This PR adds the functionality to provide an endpoint override through ~/.aws/config file's [services] section.

Example:

[profile foo]
region = us-east-1
endpoint_url = https://my-general-endpoint.com
services = dev

[profile bar]
region = us-west-2

[services dev]
s3 =
  endpoint_url = https://my-s3-specific-endpoint.com

Modifications

  • Added servicesProperty() method in AwsClientEndpointProvider to extract and resolve service-specific endpoints from the [services] section.
  • Updated clientEndpointFromEnvironment() to use the new servicesProperty in the correct load order.
  • Added ProfileSection enum to include a SERVICES section.

Testing

  • Updated parameterized tests in EndpointSharedConfigTest to include [services] as a valid source for endpoint resolution.
  • Added ProfileFileServicesTest class to verify parsing and retrieval of service-specific endpoint settings.

@RanVaknin RanVaknin force-pushed the rvaknin/add-services-section-in-ini-file-for-endpoint-url-support branch from 55413fd to 4a9a9ce Compare March 10, 2025 21:12
@RanVaknin RanVaknin marked this pull request as ready for review March 10, 2025 22:40
@RanVaknin RanVaknin requested a review from a team as a code owner March 10, 2025 22:40
@RanVaknin RanVaknin changed the title Adding service endpoint section in ini file Adding service endpoint section in config file Mar 11, 2025
@RanVaknin RanVaknin force-pushed the rvaknin/add-services-section-in-ini-file-for-endpoint-url-support branch from d471d58 to b1084a2 Compare March 12, 2025 16:42
@RanVaknin RanVaknin requested a review from millems March 12, 2025 16:44
@dagnir
Copy link
Contributor

dagnir commented Mar 12, 2025

Can you kick off integ tests?

@RanVaknin
Copy link
Contributor Author

Can you kick off integ tests?

Intg tests are passing for 5944.

@RanVaknin RanVaknin force-pushed the rvaknin/add-services-section-in-ini-file-for-endpoint-url-support branch from b1084a2 to 25c1495 Compare March 13, 2025 18:00
@RanVaknin RanVaknin force-pushed the rvaknin/add-services-section-in-ini-file-for-endpoint-url-support branch from 25c1495 to 71423c7 Compare March 17, 2025 19:00
@sonarqubecloud
Copy link

@RanVaknin RanVaknin added this pull request to the merge queue Mar 18, 2025
Merged via the queue into master with commit 6c80beb Mar 18, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants