This project automates the daily delivery of an email with three items from the Python Standard Library. The email contains the item's name, explanation, and an example. The project uses AWS Lambda, Amazon SES, and DynamoDB to deliver the email.
This project is a fork of the awesome Dutch Vocabulary project. I wanted to do something similar but with the Python Standard Library.
A CloudWatch Event Rule triggers a Lambda each morning at 7:00. The Lambda retrieves all previously sent Python items from DynamoDB. It then retrieves the new item from ChatGPT, stores it in DynamoDB, and sends them to SES. SES delivers them to the end user's email.
To deploy this project, ensure the following tools and configurations are in place:
-
Tools Installed:
- Python (Tested with Python 3.13)
- pip (Tested with pip 19.2.3)
- Terraform (Tested with Terraform 1.10.3)
- AWS CLI (Tested with 2.15.58)
-
Permissions: Your AWS CLI user must have the appropriate permissions to deploy the resources. Refer to the Terraform files and apply the principle of least privilege.
-
Amazon SES Verified Email: You need a verified email address in Amazon SES. This email must match the one used in the project. Reference: Verifying Email Addresses in Amazon SES.
-
Optional: You can zip the Lambda deployment package manually if you like:
- Use the provided
setup.sh
script or follow the steps in the script manually. - Alternatively, use the pre-zipped package:
deployment_package.zip
.
- Use the provided
-
Prepare Configuration:
- Copy
terraform.tfvars.example
toterraform.tfvars
. - Fill out the required values in
terraform.tfvars
.
- Copy
-
Run the Terraform Workflow:
terraform init terraform plan terraform apply
- Made the project work with content from the Python Standard Library.
- Did this on a Mac, so I made some changes to the setup script to work on a Mac.
- Used Python 3.13 instead of Python 3.8.
- Added an MIT license.