Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jp7io/puppy
Simple website screenshot using AWS Lambda, Chromium, and Puppeteer.
https://github.com/jp7io/puppy
chromium lambda puppeteer screenshot
Last synced: about 1 month ago
JSON representation
Simple website screenshot using AWS Lambda, Chromium, and Puppeteer.
- Host: GitHub
- URL: https://github.com/jp7io/puppy
- Owner: jp7io
- Created: 2024-01-18T04:47:05.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-22T01:19:38.000Z (11 months ago)
- Last Synced: 2024-10-19T18:13:43.489Z (2 months ago)
- Topics: chromium, lambda, puppeteer, screenshot
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Puppy
Simple website screenshot using AWS Lambda, Chromium, and Puppeteer.
## Requirements
- [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html)
- [Docker](https://docs.docker.com/get-docker/)## Run locally
```bash
npm install
sam local start-api
```## Screenshot using local environment
```bash
curl -s "http://localhost:3000/screenshot?url=https://www.example.com" -o screenshot.png
```## First deploy
```bash
sam deploy --guided --capabilities CAPABILITY_IAM
``````bash
Configuring SAM deploy
======================Looking for config file [samconfig.toml]: Found
Reading default arguments: SuccessSetting 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]:
```## Screenshot using AWS
```bash
curl -s "https://YOUR_API_ID.execute-api.us-east-1.amazonaws.com/Prod/screenshot?url=https://www.example.com" -o screenshot.png
```## TODO
- [ ] Add lambda layers