npm ci
npm start
npm test
sls deploy [-f <function name>] --stage <stage> --aws-profile <aws profile>
If you do global changes (for instance the role permissions), you need to deploy with specifying any function.
npx @puppeteer/browsers install chromium@latest --path /tmp/localChromium
Then, update CHROMIUM_PATH
in .env.dev
file.
serverless invoke local --stage <stage> --function scrape-all
serverless invoke local --stage <stage> --function search -d '{"queryStringParameters":{"q":"Terminology"}}'
Use lambda layers as explained: https://github.com/sparticuz/chromium#aws-lambda-layer
Use layers published with their releases: https://github.com/Sparticuz/chromium/releases