Skip to content

asmsuechan/sshot

Repository files navigation

sshot

logo

sshot is a tool to take the screenshot of a website.

Usage

Just curl to the endpoint with url parameter.

$ curl "https://vckvs9l162.execute-api.ap-northeast-1.amazonaws.com/production/screenshot?url=https://github.com/asmsuechan"
{"screenshot":{"url":"https://s3-ap-northeast-1.amazonaws.com/sshot-images/kvd6ajor2hbprpb9.png"}}

Caution: Your screenshots will be uploaded to our public S3 bucket (sshot-images). If you hate to make your screenshots public, you should deploy your own sshot on your AWS by serverless framework.

Options

Available options in query parameter are:

name value
url string (e.g. https://github.com)
base64 boolean (true/false)

Deploy your own sshot

  1. Clone this repository and run yarn
  2. Install serverless framework
  3. Create an IAM user with appropreate rights for serverless and get its credentials
  4. Create a S3 bucket
  5. Fill config.json
  6. Set environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, REGION) to run serverless
  7. Run yarn run deploy

Actual steps are:

$ git clone https://github.com/asmsuechan/sshot.git
$ cd sshot
$ yarn
$ yarn add global serverless
$ vim config.json
$ cat config.json
{
  "AWS_ACCESS_KEY_ID": "your key",
  "AWS_SECRET_ACCESS_KEY": "your key",
  "REGION": "your region",
  "BUCKET_NAME": "your bucket name"
}
$ export AWS_ACCESS_KEY_ID=xxxxxxxx
$ export AWS_SECRET_ACCESS_KEY=xxxxxxxxx
$ export REGION=ap-northeast-1
$ yarn run deploy

Any questions? Open an issue and ask us, please.

How to develop

TODO

Libraries

Licence

MIT

Author

asmsuechan

About

📷 Easy screenshot taker on serverless

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published