Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
%.zip:
npm i
tsc
mkdir -p nodejs/node_modules/playwright-aws-lambda/
cd nodejs/ && npm install lambdafs@~1.3.0 playwright-core@~1.3.0 --no-bin-links --no-optional --no-package-lock --no-save --no-shrinkwrap && cd -
cp -R ./src/bin/ ./dist/src/bin/
npm pack
tar --directory nodejs/node_modules/playwright-aws-lambda/ --extract --file playwright-aws-lambda-*.tgz --strip-components=1
rm playwright-aws-lambda-*.tgz
mkdir -p $(dir $@)
zip -9 --filesync --move --recurse-paths $@ nodejs/
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ await loadFont(
);
```

### Deploying as lambda layer

Run this command and then publish playwright-aws-lambda.zip on AWS Lambda Layer

```
git clone --depth=1 https://github.com/JupiterOne/playwright-aws-lambda.git && \
cd playwright-aws-lambda && \
make playwright-aws-lambda.zip
```

## Thanks / Credits

This project is based on the work of
Expand Down