Skip to content

jobinbasani/aws-lambda-website-to-pdf

Repository files navigation

Website to PDF using AWS Lambda

This is a project that converts a website to PDF using AWS Lambda. The infrastructure is defined using AWS CDK. This uses the Function URL feature of Lambda functions.

Useful commands

  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

Execution

Check the CDK deployment output to find the value of WebsiteToPDFStack.websiteToPDFFunctionURL. Use the url query parameter to provide the URL of the website to be converted to PDF.

For example: https://youruniqueid.lambda-url.ca-central-1.on.aws/?url=https://jobinbasani.com/