{"id":18761700,"url":"https://github.com/audunru/aws-lambda-pdf","last_synced_at":"2025-04-13T03:31:50.186Z","repository":{"id":258772599,"uuid":"875598641","full_name":"audunru/aws-lambda-pdf","owner":"audunru","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-21T06:43:31.000Z","size":426,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-23T07:42:29.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/audunru.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-20T12:16:24.000Z","updated_at":"2024-10-21T06:43:22.000Z","dependencies_parsed_at":"2024-10-21T21:37:32.375Z","dependency_job_id":null,"html_url":"https://github.com/audunru/aws-lambda-pdf","commit_stats":null,"previous_names":["audunru/aws-lambda-pdf"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audunru%2Faws-lambda-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audunru%2Faws-lambda-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audunru%2Faws-lambda-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audunru%2Faws-lambda-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/audunru","download_url":"https://codeload.github.com/audunru/aws-lambda-pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223564659,"owners_count":17165988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:17:26.459Z","updated_at":"2025-04-13T03:31:50.180Z","avatar_url":"https://github.com/audunru.png","language":"TypeScript","readme":"# AWS Lambda PDF\n\nAn AWS Lambda function that will accept HTML as its input and return a PDF.\n\n## 2025-03-15 Update\n\nI've migrated away from Amazon Lambda, and I've turned this into a [Dockerized node app](https://github.com/audunru/html2pdf) instead.\n\n## Installation\n\n```sh\nnpm i aws-lambda-pdf\n```\n\n## Usage\n\nWe'll be using [Serverless](https://www.serverless.com/framework/docs/getting-started) to deploy the function, so make sure you set up AWS credentials first.\n\nCreate a [serverless.yml](example/serverless.yml) file in the same folder as your package.json where you installed `aws-lambda-pdf`, then run:\n\n```\nnpx serverless deploy\n```\n\n## Test\n\nThis will produce a PDF with the text \"Hello world\" in it:\n\n```sh\ncurl https://replace-with-your-url.execute-api.us-east-1.amazonaws.com/dev/pdf \\\n  -H 'Content-Type: application/json' \\\n  -H 'Accept: application/pdf' \\\n  --data-raw $'{\"html\":\"\u003chtml\u003e\u003cbody\u003e\u003cp\u003eHello world\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e\"}' \\\n  --output hello-world.pdf\n```\n\n## Logging\n\n[Live Tail in CloudWatch](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:live-tail)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudunru%2Faws-lambda-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faudunru%2Faws-lambda-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudunru%2Faws-lambda-pdf/lists"}