Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

aws-lambda-pdf

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-lambda-pdf

Create PDFs using Amazon Lambda functions

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

AWS Lambda PDF

An AWS Lambda function that will accept HTML as its input and return a PDF.

Installation

npm i aws-lambda-pdf

Usage

We'll be using Serverless to deploy the function, so make sure you set up AWS credentials first.

Create a serverless.yml file in the same folder as your package.json where you installed aws-lambda-pdf, then run:

npx serverless deploy

Test

This will produce a PDF with the text "Hello world" in it:

curl https://replace-with-your-url.execute-api.us-east-1.amazonaws.com/dev/pdf \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/pdf' \
  --data-raw $'{"html":"<html><body><p>Hello world</p></body></html>"}' \
  --output hello-world.pdf

Keywords

aws

FAQs

Package last updated on 26 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts