This project implements an email forwarding service using AWS CDK, Lambda, S3, and SES.
- AWS CDK: Infrastructure as code for easy deployment and management.
- Lambda: Serverless function to process and forward emails.
- S3: Storage for incoming emails.
- SES: Email receiving and sending service.
To deploy the project, you will need to have an SES verified domain connected to a Route53 hosted zone already set up. For more information on setting up an SES verified domain, see Verify a New Domain in Amazon SES. By default, account SES regions are in sandbox mode and must be moved to production to send emails to unverified addresses.
First, ensure you have uv installed. You can install it using one of the official commands:
- pip: Suggested:
pipx install uvorpip install uv - Homebrew:
brew install uv - macOS/Linux:
curl -LsSf https://astral.sh | sh - Windows:
powershell -c "irm https://astral.sh | iex"
-
Fork and clone the repository.
-
Install project dependencies (this automatically sets up a virtual environment):
uv sync
-
Install the pre-commit hooks so your code is automatically linted before every commit:
uv run pre-commit install
-
Manually run lints across all files:
uv run pre-commit run --all-files
-
Run the tests:
uv run pytest -q
from_email: The email address to use as the sender.subject_prefix: The prefix to add to the subject line of forwarded emails.email_bucket: The S3 bucket name for storing emails.email_key_prefix: The prefix for email objects in the S3 bucket.forward_mapping: A mapping of recipient emails to forward to.
To add a new email forward, update the forward_mapping repository variable in Github settings, following the existing convention and ensuring that it is a valid JSON object.
This project is licensed under the Apache License. See the LICENSE file for details.