cloudformation_example/s3-notifications-to-lambda at master · andylim0221/cloudformation_example · GitHub
Skip to content

Latest commit

 

History

History

s3-notifications-to-lambda

Folders and files

README.md

S3 event notification

This experiment is about configuring S3 event notification to trigger Lambda and send a message to email through SNS in Lambda, by Cloudformation. The purpose of this experiment is

  1. To get comfortable with the syntax of Cloudformation, python and bash
  2. To acquire knowledge about Cloudformation requirements
  3. To get comfortable with IaC

Prerequisite

  1. AWS cli
  2. Python and pip
  3. AWS account and user
  4. Change your bucket name, email address, iam user from example.yml and the bucket name from example.py

How to run the project

  1. give execution permission and run bash script deploy.sh
$ chmod +x deploy.sh kill.sh
$ ./deploy.sh
  1. Accept AWS SNS notification permission from your email, check your junk mail as well

  2. Run example.py to push a simple zip file into s3 bucket

$ python example.py
  1. to kill the stack, make sure your s3 bucket is empty, then run the script below:
$ ./kill.sh