Unsubscribe Link in Email with AWS Lambda and Terraform

Image for post
Image for post
GitHub Repository

Introduction

Image for post
Image for post
unsubscribing from Pomodoro by Increaser news

Link

<a target="_blank" href="https://pomodoro-subscriber.increaser.org/pomodoro-news-email/{{id}}/unsubscribe">unsubscribe</a>

Lambda

Infrastructure

$ export AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY_ID>
$ export AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET_ACCESS_KEY>
$ export AWS_REGION=<YOUR_AWS_REGION>
$ export GITHUB_TOKEN=<YOUR_GITHUB_TOKEN>
$ export TF_VAR_name=<NAME_FOR_RESOURCES>
$ export TF_VAR_docdb_password=<PASSWORD_FOR_AMAZON_DOCUMENTDB>
$ export TF_VAR_certificate_arn=<YOUR_DOMAIN_SERTIFICATE_ARN>
$ export TF_VAR_zone_id=<YOUR_DOMAIN_ZONE_ID>
$ export TF_VAR_domain=<YOUR_DOMAIN>
$ terraform init
$ terraform apply
Image for post
Image for post
Increaser

Written by

Software engineer, creator of increaser.org. More at geekrodion.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store