This project is a small example of how to send an email using AWS SES. It contains a cloudformation YAML template to create a simple newsletter signup email template as well as a node script to invoke the email.
- A configured AWS CLI
- NodeJS installed
- 2 verified email address in AWS SES, one for the
from
address, one for theto
address
- Open a terminal and navigate to the root of this project
- Run
sh ./provision.sh
- Wait for the stack to be created
- Open a terminal and navigate to the root of this project
- Run
npm ci
- Run
sh ./run -f [from address] -t [to address] -n [name of recipient]
- Open a terminal and navigate to the root of this project
- Run
sh ./destroy.sh
The cloudformation template creates a basic newsletter welcome email template. Including a name parameter to show how to pass parameters to a template.
To keep everything as self-contained as possible, the cloudformation template outputs the name of the created email template for use with the node script.
Note: This project assumes the us-east-1
region for ease of demonstration.
A basic node application has been provided to show how an application could interact with SES to send an email using the provisioned template.