This project is an implementation of a simple AWS email forwarder following these steps:
-
A new email is sent from an external sender to your domain. Amazon SES handles the incoming email for your domain.
-
An Amazon SES receipt rule saves the incoming message in an S3 bucket.
-
An Amazon SES receipt rule triggers the execution of a Lambda function.
-
The Lambda function retrieves the message content from S3, and then creates a new message and sends it to Amazon SES.
-
Amazon SES sends the message to the destination server.
We are using serverless-stack to manage infrastructure as code ( CDK under the hoods ) and Lambda development and deployment.
The project has two main configuration environment varibles:
-
BUCKET_NAME, which is the name of the S3 bucket of step 2 we are going to create
-
FORWARD_MAPPING_SSM_KEY, which is the key of SSM parameter that stores a JSON mapping for forwarding
-
RECIPIENTS, which is a comma separated lists of recipients we are going to handle with this email forwarder
Starts the local Lambda development environment.
Build your app and synthesize your stacks.
Generates a .build/
directory with the compiled files and a .build/cdk.out/
directory with the synthesized CloudFormation stacks.
Deploy all your stacks to AWS. Or optionally deploy a specific stack.
Remove all your stacks and all of their resources from AWS. Or optionally remove a specific stack.
Runs your tests using Jest. Takes all the Jest CLI options.