Forwards only the subject of the emails to secure your phone from robbers
The entire documentation about this project is presented in my blog post.
AWS offers a generous free tier for the services we use:
Parameter Store
: Standard parameters are free. The interaction (retrieve/update value) with the parameter costs $0.05
per 10,000 interactions.EventBridge Rule
: Free for our use case.SNS
: 1,000 notifications are free, after that $2 per 100,000 notifications.Lambda
: This varies based on the memory and execution time of the Lambda. Using a Lambda of 512MB and 5s for each execution and running every 1 minute we will use around 110,000GB-s/month
. The free tier is 1 million invocations per month and 400,000Gb-s of compute time. So for us, this will be free.So this is very likely to be free for you!
To make it more user-friendly I will do a step-by-step guide to help you setup all of this. Follow this in order!
The first thing we need to do is to access your Gmail settings and make sure the IMAP
is enabled (check the Forwarding and POP/IMAP
tab).
After that let's create a new App Password for us to use with the IMAP.
App Passwords
Make sure to do all these steps in the email accounts you want to secure, in my case I have two (so I did this for both accounts).
To make the development live easier I set up DevBox in the project. So you only need to have DevBox installed and run devbox shell
to install all the dependencies of the project (NodeJS, Yarn...).
devbox shell
infrastructure
foldercd infrastructure
yarn
Modify the config.ts
file accordingly
Deploy the infrastructure
yarn cdk deploy
Make you have AWS credentials setup in place and that your account-region is already CDK bootstraped.
/email/gmail.com/<YOUR_EMAIL>/password
) to used the app password you copied.Finally! Now we are receiving our forwarded emails as expected!