aws-sdk-java icon indicating copy to clipboard operation
aws-sdk-java copied to clipboard

Support for setting UserAgent Prefix through environment variable

Open muthurajr opened this issue 2 years ago • 1 comments

Describe the feature

We are looking at options to prefix UserAgent for s3 client from sdk's. One possible option is change every code like below. This option works but it comes with the risk and time consumption of changing every microservice connecting to s3.

AWSCredentials credentials;
ClientConfiguration conf = new ClientConfiguration()
    .withUserAgentPrefix("APN/1.0 PARTNER/1.0 PRODUCT/1.0");
AmazonS3Client client = new AmazonS3Client(credentials, conf);

Recently, environment variable based user agent setting is introduced in python and ruby SDK's https://github.com/boto/botocore/pull/2955 It would be helpful to implement similar feature in the Java sdk as well.

Use Case

Flexibility to inject User Agent in the existing apps through environment variable, and sync the feature with other language sdk's.

Proposed Solution

https://github.com/boto/botocore/pull/2955

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

latest 1.12.501

JDK version used

17.0.7

Operating System and version

alpine 3.18 (latest)

muthurajr avatar Jul 04 '23 15:07 muthurajr

Acknowledged.

This has better chances to be implemented in v2 as it's where the team is concentrating most of the effort, and I see you already submitted a feature request - https://github.com/aws/aws-sdk-java-v2/issues/4162.

debora-ito avatar Jul 06 '23 19:07 debora-ito

We are closing stale v1 issues before going into Maintenance Mode. Please track this feature request in v2 - https://github.com/aws/aws-sdk-java-v2/issues/4162.

Reference:

  • Announcing end-of-support for AWS SDK for Java v1.x effective December 31, 2025 - blog post

debora-ito avatar Jul 26 '24 23:07 debora-ito

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Jul 26 '24 23:07 github-actions[bot]