-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Describe the story
Create a wrapper utility for the AWS SDK SESv2Client. This should simplify the creation of the AWS SDK SES (Simple Email Service) client and it should store the created instance as a singleton for reuse across Lambda function invocations.
The wrapper should provide helper functions that simplify interaction with the following operations:
- Send Email
- Consider if 2 functions for "Send Email" is better for the caller:
- Send Simple Email - uses the "Simple"
Contentvalues where the subject, body, and attachments are provided as function parameters - Send Template Email - uses the "Template"
Contentvalues
- Send Simple Email - uses the "Simple"
- Consider if 2 functions for "Send Email" is better for the caller:
- Send Bulk Email
- Consider similarly if a 2 function approach is better for the caller
- These
SESv2Clientcommands have very complex input objects and the goal of these helper functions is to provide a simple function interface for the most commonly used inputs for sending emails; not to provide every input possible.
The wrapper should provide a getter which returns the singleton instance of the SESv2Client.
Acceptance criteria
GIVEN the app initializes an instance of the SES client
WHEN no parameters are supplied to the initializer
THEN an instance of the client is created using the default configuration for the SESv2Client
WHEN the SESv2ClientConfig is provided to the initializer
THEN the SESv2Client instance is constructed using the supplied configuration
WHEN the SESv2Client instances are constructed
THEN they are cached as singleton instances
GIVEN that any operation helper function is invoked (e.g. Send Email, etc.)
WHEN the singleton instance does not exist
THEN a SESv2Client instance is constructed with default configuration
AND the instance is cached as the singleton
AND the instance is used by the helper function
WHEN the singleton instance already exists
THEN the instance is used by the helper function
Additional context
Reference existing AWS SDK wrapper utilities for the implementation approach.
Update and create project documentation for the SES client.