spring-cloud-aws icon indicating copy to clipboard operation
spring-cloud-aws copied to clipboard

Add module for SES v2

Open rmschots opened this issue 9 months ago • 7 comments

:loudspeaker: Type of change

  • [ ] Bugfix
  • [x] New feature
  • [ ] Enhancement
  • [ ] Refactoring

:scroll: Description

Add a module to allow use of SES API v2.

:bulb: Motivation and Context

Amazon SES API v1 accepts messages up to 10MB in size including any images and attachments that are part of the message. SES API v2 accepts up to 40MB. Issue https://github.com/awspring/spring-cloud-aws/issues/595 Alternative solution to https://github.com/awspring/spring-cloud-aws/pull/1336. This solution guarantees no breaking changes with previous versions, and allows using the v2 API instead.

:green_heart: How did you test it?

  • Same tests as the v1 API, as the functionality is the same.
  • Manually tested a new sample application, using localstack pro, as only the pro version supports ses v2.

:pencil: Checklist

  • [x] I reviewed submitted code
  • [x] I added tests to verify changes
  • [x] I updated reference documentation to reflect the change
  • [x] All tests passing
  • [x] No breaking changes

:crystal_ball: Next steps

rmschots avatar Mar 09 '25 15:03 rmschots

Thanks @rmschots for a PR. Perhaps it could be improved to reduce the duplication, as these classes from V1 and V2 are pretty much the same with small differences. Perhaps both V1 and V2 could live in single module with optional dependencies to SES SDKs, which would allow us to have an abstract base classes for two versions, and then there would be two starters for V1 and V2 that would bring related SDKs? What do you think about it? cc @MatejNedic

maciejwalkowiak avatar Mar 15 '25 07:03 maciejwalkowiak

@maciejwalkowiak I implemented the separate module based on the feedback on https://github.com/awspring/spring-cloud-aws/pull/1336#issuecomment-2629096457. Maybe best that there is a consensus on the solution before people create another PR.

rmschots avatar Mar 15 '25 08:03 rmschots

@maciejwalkowiak Personally I would prefer duplication since SDK is different. We can slowly than deprecate V1 version much cleaner, specific feature and implementations can be handled much better and so on.

I would go with split. Let me take a look in code and think about it, will make a review in following days.

MatejNedic avatar Mar 15 '25 15:03 MatejNedic

@MatejNedic Maybe time to look at this one again? It's been a while since it has been forgotten.

rmschots avatar Jul 28 '25 11:07 rmschots

I will take a look in following days.

@maciejwalkowiak if all is good we can target it for 4.0.0?

MatejNedic avatar Jul 28 '25 14:07 MatejNedic

Since it is a new feature and they broke api I would like to either

  1. In 4.0.0 go with breaking change and migration guide.
  2. Create new module if people want to use V2 api

Since V2 is not really bringing that much to a table, at least not for our integration, I would go with an option 2.

If someone is interested in changes V2 brings-> https://aws.amazon.com/blogs/messaging-and-targeting/upgrade-your-email-tech-stack-with-amazon-sesv2-api/

MatejNedic avatar Jul 29 '25 08:07 MatejNedic

Hey guys, thanks for the amazing work! Really appreciate it.

We really need this module.

Can you give us a timeline for when this PR will be merged? We really need it 🙏

MajnunMan avatar Sep 23 '25 08:09 MajnunMan