Skip to content

Receive AWS newsletter around news, announcements, blog posts and more

Notifications You must be signed in to change notification settings

andrejmaya/aws-email-newsletter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Newsletter via E-Mail 📫

AWS E-Mail Newsletter Architecture Diagram

Prerequisites 🙋

  • Active AWS credentials
  • pip
  • AWS SAM CLI
  • SES in production mode (see here)
  • Verified Domains and/or E-Mail Id in SES (see here)

Installation 👷

  1. Install python modules:
pip install -r src/newsletter_email/requirements.txt -t src/newsletter_email/dependencies/python
  1. Run SAM deployment:
sam deploy --parameter-overrides \
	EmailSender=noreply@stormfsi.de \
	"EmailWhitelistPattern=(^[a-zA-Z0-9_.+-]+@reply\.(de|it|com|eu)$)" \
	"MailFrequency=rate(7\ days)" \
	CutoffDays=7 \
	OpsEmailid=<YOUR_OPS_EMAIL> \
--guided

See these example values for SAM:

	Stack Name [sam-app]: awsnewsletteremailer
	AWS Region [eu-central-1]:
	Confirm changes before deploy [y/N]: N
	Allow SAM CLI IAM role creation [Y/n]: Y
	Disable rollback [y/N]: N
	NewsletterSubscribersFunction may not have authorization defined, Is this okay? [y/N]: y
	Save arguments to configuration file [Y/n]: Y
	SAM configuration file [samconfig.toml]: <ENTER>
	SAM configuration environment [default]: <ENTER>

Test locally

First of all you need to set export LOCAL_TEST=true.

Then create a virtual env and run the newsletter.py

python3 -m venv /tmp/python_venv
. /tmp/python_venv/bin/activate
pip install -r src/newsletter_email/requirements.txt
cd src/newsletter_email
python newsletter.py

Usage 🏃

Open the URL given in the output of the SAM deployment. Enjoy! 😎 🌟

About

Receive AWS newsletter around news, announcements, blog posts and more

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •