Skip to content

Latest commit

 

History

History

03. Serverless Lambda, CloudWatch, DynamoDB, S3, SES, EventBridge Scheduler application

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

# Screenshots (WAIT FOR LOADING 10-15 PNG files) -

Link - https://clipchamp.com/watch/Iuuqu75ZzqQ

Made with Clipchamp <iframe allow="autoplay;" allowfullscreen style="border:none" src="https://clipchamp.com/watch/Iuuqu75ZzqQ/embed" width="640" height="360"></iframe>

Cloud Architecture
Cloud Architecture no text s3 bucket static html files s3 bucket static html file link deployed static website for interacting with Lambda function via rest API, eg. getting all bds list, getting todays bds list and adding new bd DynamoDB items adding new item via s3 website S3 website - updated today's bd list DynamoDB -  updated today's bd list EventBridge Scheduler - starting scheduler at 1 min interval cron job for email automation EventBridge Scheduler - starting scheduler at 1 min interval cron job for email automation Lambda Function - serverless code for our backend SES for email sending IAM for role management API Gateway for creating rest API endpoints for our Lambda Function Cloudwatch for looking at metrics, query, graph for usage, see cron jobs running at interval of 1 min below in graph Cloudwatch for looking at logs, see cron jobs running at interval of 1 min below in graph Email coming at interval of 1 min notifying today's bd list Email content notifying today's bd list Cloudwatch after deleting Today's BD list item looking, see cron jobs running at interval of 1 min below in graph Email no response since last 10 minutes of deleting today's birthday list item from DynamoDB. Hence, it does not send email on deleted days!

What we did -

Birthday Reminder App with Email Automated - Deployed static website on s3 on which user can add names and DOB of people, which calls serverless lambda app through API Gateway, which adds or gets list of all people or get list of today's birthdays people. Also, we've automated this process of everyday's birthday via EventBridge Scheduler for running cron jobs that sends email about today's birthdays from the list.

To summarize the flow:

  • Users enter the name and birthdate through the UI.
  • The UI calls the Lambda function to store the information in DynamoDB (if you choose to use a database).
  • The CloudWatch Events trigger the Lambda function every hour.
  • The Lambda function checks if today is the birthday of any stored person and sends a message using Amazon SNS to your WhatsApp number if it is their birthday.

It's worth mentioning that while serverless architectures can be highly scalable and cost-effective, they might have some limitations depending on the complexity of your application. However, for a simple application like the one you described, AWS serverless services should work well.

  • Note: for AWS API Gateway and other functions to work properly like here in case i have my lambda function calling up my DynamoDB instance, both have to be in same region(here i used ap-south-1 earlier when it was giving me error, it was eu-north-1 for DynamoDB instance), otherwise it will give error "Resource Not found".

Resources -

  1. [Python] Build a CRUD Serverless API with AWS Lambda, API Gateway and a DynamoDB from Scratch - https://www.youtube.com/watch?v=9eHh946qTIk&ab_channel=FelixYu and API Authentication via API Keys | AWS API Gateway - https://www.youtube.com/watch?v=V-ac_ZvdAW4&ab_channel=FelixYu

  2. AWS API Gateway to Lambda Tutorial in Python | Build a REST API - https://www.youtube.com/watch?v=uFsaiEhr1zs&ab_channel=BeABetterDev

  3. https://www.youtube.com/watch?v=mQov1eetSec&ab_channel=ListenToLearn

  4. DynamoDB Python GET | PUT | DELETE | SCAN | QUERY Boto3 Tutorial - https://www.youtube.com/watch?v=Al1xwYhQ-BM&ab_channel=SoumilShah

  5. https://www.youtube.com/watch?v=vXiZO1c5Sk0&ab_channel=BeABetterDev

  6. Schedule AWS Lambda Functions Using EventBridge and CloudWatch - https://www.youtube.com/watch?v=-ResiAcM8pg&ab_channel=AjayWadhara