Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support endpoint override with environment variables #4501

Closed
2 tasks
fkjaekel opened this issue Sep 28, 2023 · 8 comments
Closed
2 tasks

Support endpoint override with environment variables #4501

fkjaekel opened this issue Sep 28, 2023 · 8 comments
Labels
closed-for-staleness feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@fkjaekel
Copy link

Describe the feature

I'm looking forward to use this feature with the Java SDK.

I was not able to get it working with the SSM client version 2.20.156 and there are no mentions to the Java SDK here.

Use Case

Be able to use SsmClient.create() instead of SsmClient.builder().endpointOverride(customUri).build() when AWS_ENDPOINT_URL or AWS_ENDPOINT_URL_SSM is set.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.20.156

JDK version used

openjdk version "17.0.6" 2023-01-17

Operating System and version

Linux Mint 21.2

@fkjaekel fkjaekel added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 28, 2023
@BalmungSan
Copy link

BalmungSan commented Sep 28, 2023

The compatibility page also mentions this not being supported by the Java SDK v2: https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html#ss-endpoints-sdk-compat

@debora-ito
Copy link
Member

Feature request acknowledged.

Community note: if you want to show your support for this feature, add a 👍 to the description, it helps us with feature prioritization.

@debora-ito debora-ito added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Sep 29, 2023
@benvalkin
Copy link

Any progress on this? I am currently testing a Java app using LocalStack and it would be great to be able to switch between the real AWS endpoint and my local testing endpoint without changing any code. This feature is exactly what I am looking for currently and there aren't any other feasible workarounds I can use.

@mikiTesf
Copy link

Related issue here

@MateuszWicherski
Copy link

I am looking forward to it as well, but I have other (somewhat related) question - are there any plans/options to support providing the endpoints at runtime using System properties (similarly to the credentials)? If this is something that is worth a separate issue, then could you point me to the place I can create it (if it is not Java SDK only related)

@theodiefenthal
Copy link

While @BalmungSan correctly points out that in the referenced compatibility matrix the Java SDK is currently listed as not supporting the feature, another page on the AWS documentation actually states it is supported: https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html#JVMSettings

At least for JVM properties, it states that You can use the following JVM system properties for the AWS SDK for Java and the AWS SDK for Kotlin (targeting the JVM) and lists aws.endpointUrl and aws.endpointUrl<ServiceName> as those. However, same as with the environment variables, it actually doesn't work with the aws java sdk.

Would be awesome to have this feature added soon as (at least for me) I'd finally get rid of all custom configurations when creating a S3 client and can rely on standardized configuration everywhere.

@matheisco
Copy link

After upgrading to 2.28.4, the JVM system property aws.endpointUrl worked for me.

@debora-ito
Copy link
Member

That's right, thank you @matheisco.

Support for service-specific endpoints with environment variables and system properties was added in Java SDK version 2.28.1.

We updated the compatibility matrix in the Service-specific endpoints reference guide to show SDK for Java 2.x = yes.

@debora-ito debora-ito added the closing-soon This issue will close in 4 days unless further comments are made. label Oct 7, 2024
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will close in 4 days unless further comments are made. labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

8 participants