Lambda to transform json in PDF
Deploy using serverless https://serverless.com/
launch the commands from a cloud9 instance
clean all cloudofmration errors and delete bucket kiodo-vault-pdf
install serverless
curl -o- -L https://slss.io/install | bash
git clone https://github.com/FabioChiodini/kpdf.git
cd kpdf
sls plugin install -n serverless-python-requirements
sls deploy
if build fails check if there's enough space on the instance and clean unused docker images: docker image prune -a
test with
curl -d '{"filename":"my-sample-filename.pdf", "html":"
"}' -H "Content-Type: application/json" REPLACE-WITH-YOUR-ENDPOINTcheck in the S3 bucket
empty the s3 bucket before deleting
sls remove