Deploy @sparticuz/chromium as a AWS Lambda Layer.
plugins:
- serverless-latest-layer-version
functions:
handler:
handler: handlers/handler.handler
layers:
- arn:aws:lambda:${aws:region}:${aws:accountId}:layer:chromium:latest
For convenience, use the plugin serverless-latest-layer-version to always get the latest layer version.
The package.json
is only used to keep track of the @sparticuz/chromium
version with dependabot.
serverless/github-action
is used to deploy the layer to the AWS account of your choice, you only have to configure AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
environment variables.