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

Use AmazonSimpleEmailServiceClientBuilder when creating AWSJavaMailTransport without provided credentials. #2635

Closed
serhiimarian opened this issue Aug 31, 2021 · 3 comments
Labels
feature-request A feature should be added or improved.

Comments

@serhiimarian
Copy link

We want our application to use amazon SES instead of custom SMTP, part of this functionality is tied to TransportListeners, so I decided to go with AWSJavaMailTransport instead of just AmazonSimpleEmailServiceClient, I need to pick up credentials from assigned role in ECS Fargate service, but when I'm trying to fill properties with credentials taken from different providers I get AmazonSimpleEmailServiceException: The security token included in the request is invalid.. As a workaround I want to use AWSJavaMailTransport without credentials, for it to rely on no argument constructor for AmazonSimpleEmailServiceClient, but deprecated version sets region to us-east-1 by default, while AmazonSimpleEmailServiceClientBuilder.defaultClient() picks up both proper credentials and region.

I want to use AmazonSimpleEmailServiceClientBuilder.defaultClient() in protocolConnect() method AWSJavaMailTransport.

  • AWS Java SDK version used: 1.12.22
  • JDK version used: jdk1.8.0_302 (Amazon Coretto)
  • Operating System and version: Windows 10
@serhiimarian serhiimarian added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 31, 2021
@debora-ito debora-ito removed the needs-triage This issue or PR still needs to be triaged. label Jun 21, 2022
@debora-ito
Copy link
Member

Hi @serhiimarian apologies for taking so long to get a response. Reasonable feature request, I see that the client created in protocolConnect() is the deprecated version new AmazonSimpleEmailServiceClient().

The team focus is in releasing features for the Java SDK v2, so this has low chance of being implemented unfortunately.

@debora-ito
Copy link
Member

We don't have plans to support this in v1 before going into Maintenance Mode, so I'll go ahead and close this issue.

Reference:

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

@debora-ito debora-ito closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants