Build weasyprint for python 3.6 to run on aws lambda.
make build-package
cp samples/handler.py /build/package/task
make zip-package
- Upload the resulting package
weasy-lambda/build/package/task.zip
to lambda - Configure function to use
handler.handler
as the lambda handler - Set execution timeout to 10
make build-package
- Add your custom lambda handler to
weasy-lambda/build/package/task
or use the sample inweasy-lambda/samples/handler.py
make zip-package
- Upload the resulting package
weasy-lambda/build/package/task.zip
to lambda
make build-layer
make zip-layer
- Use the resulting package
weasy-lambda/build/layer/python.zip
to create a new lambda layer