Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 681 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 681 Bytes

terraform-aws-lambda-bot

A bot with AWS Lambda and Puppeteer and it is managed by Terraform. It also adds a CloudWatch event rule to trigger the bot regularly.

chrome-aws-lambda is packaged as AWS Lambda layer to provide Chromium binary.

Setup

# Build Chrome AWS Lambda (For AWS Lambda Layer)
chmod +x build_layer.sh
./build_layer.sh

# Build Lambda
cd src
chmod +x build_src.sh
./build_src.sh
cd ..

Deploy

terraform plan -var-file="production.tfvars"
terraform apply -var-file="production.tfvars"

Try

Trigger Lambda with the following event

{
  "url": "https://www.google.com"
}