AWS Lambda application to send emails via AWS SES using information recieved from AWS SNS notification
This lambda is used in DataWorks to send out emails when needed. It is not used for any daily BAU purposes. The lambda is deployed via the aws-common-infrastructure
repository.
The lambda uses templates, which are deployed from the aws-common-infrastructure
repository as well.
In order to send an email from this lambda, you can invoke it with a payload that looks like an sns message:
{
"Records": [
{
"Sns": {
"Message": {
...
}
}
}
]
}
The message object should have the following properties:
recipients
-> A;
separated list of email recipientsmailing_list
-> A mailing list name for the email to go tobucket
-> The S3 bucket name containing the email templatesplain_text_template
-> The name of the plain text email template file from s3template_variables
-> The variables as a key/value pair dictionary that with be inserted in to the templatehtml_template
-> The name of the html email template file from s3from_local_part
-> The name of the from field