This is based on WeeklyEmail, but uses CUOC's API to get the data, therefore there is no front end or web interface for this version, it simply pulls data from CUOC and formats it into the weekly email.
git clone https://github.com/bwindsor/weekly-email-2.git
npm install
- Rename
test/testconfig.ts.template
totest/testconfig.ts
and insert your desired from/to addresses. npm run build
- Make sure you have an AWS IAM account with SES send permissions configured with the AWS CLI
- Set environment variables
export AWS_PROFILE=weekly-email
, whereweekly-email
should be replaced by the name of your profileexport AWS_REGION=us-east-1
whereus-east-1
should be the AWS region you are using
npm run send-test
to send a test emailnpm run send-production
to send a production email
- Run the steps in the set up from scratch section above
- Download terraform
- Make sure you have an AWS IAM account with admin permissions on your account so that you can deploy the infrastructure using it, and configure this with the AWS CLI.
export AWS_PROFILE=weekly-email
whereweekly-email
should be replaced by the name of your AWS credentials profileterraform init
- Rename
terraform.tfvars.template
toterraform.tfvars
and replace the values with your ones. - Make sure the email address your are sending from is verified by adding it in the AWS console here.
npm run deploy
Note that npm run deploy
just builds a special build-production
folder which contains the build and all dependencies required for the lambda function on AWS, and then runs terraform apply
. You can do these steps separately, for example if you just want to plan, then run npm run build-production
then terraform plan
.