Simple website screenshot using AWS Lambda, Chromium, and Puppeteer.
npm install
sam local start-api
curl -s "http://localhost:3000/screenshot?url=https://www.example.com" -o screenshot.png
sam deploy --guided --capabilities CAPABILITY_IAM
Configuring SAM deploy
======================
Looking for config file [samconfig.toml]: Found
Reading default arguments: Success
Setting default arguments for 'sam deploy'
=========================================
Stack Name [puppy]: puppy
AWS Region [us-east-1]:
Confirm changes before deploy [y/N]: y
Allow SAM CLI IAM role creation [Y/n]: y
Disable rollback [y/N]: y
PuppyLambda has no authentication. Is this okay? [y/N]: y
Save arguments to configuration file [Y/n]: y
SAM configuration file [samconfig.toml]:
SAM configuration environment [default]:
curl -s "https://YOUR_API_ID.execute-api.us-east-1.amazonaws.com/Prod/screenshot?url=https://www.example.com" -o screenshot.png
- Add lambda layers