Skip to content

OnerInce/webpage-change-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Web Page Change Notifier

This simple serverless Lambda application, written in Python and Terraform, regularly checks for the changes on a webpage and notifies the user using AWS SNS

📝 Table of Contents

💭 How it works

  • Lambda scraper function runs on a schedule (every 1 hour) and saves page source HTML to DynamoDB
  • Using DynamoDB Streams, any changes on the page HTML gets detected. Second (notifier) Lambda function gets triggered
  • Notifier Lambda function sends a message to SNS topic
  • Notification gets delivered to topic subscribers

🎈 How to Deploy

First, customize the paramaters defined in template.yaml

There are 2 parts to deploy:

  • Lambda functions with SAM

    cd sam/app
    

    Build:

    sam build --use-container
    

    Deploy to AWS:

    sam deploy --guided
    

    To configure and customize SAM template, see the documentation

  • Other AWS Resources with Terraform

    Terraform is the Infrastructure as code (IaC) tool that I used in this proejct to manage other AWS resources.

    After configuring required backend (see here), customize the prod.tfvars file.

    cd terraform
    

    Plan to see which resources will be created:

    terraform plan --var-file=prod.tfvars
    

    Create all resources on your account:

    terraform apply --var-file=prod.tfvars