{"id":14984375,"url":"https://github.com/sean-hill/aws-puppeteer-lambda","last_synced_at":"2025-04-10T20:10:42.162Z","repository":{"id":57188416,"uuid":"132196379","full_name":"sean-hill/aws-puppeteer-lambda","owner":"sean-hill","description":"Tooling that allows puppeteer v1.4.0 to run within the AWS Lambda environment.","archived":false,"fork":false,"pushed_at":"2018-05-24T18:08:02.000Z","size":83599,"stargazers_count":38,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T17:52:45.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sean-hill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-04T22:55:54.000Z","updated_at":"2024-03-17T15:08:02.000Z","dependencies_parsed_at":"2022-08-28T13:00:43.429Z","dependency_job_id":null,"html_url":"https://github.com/sean-hill/aws-puppeteer-lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-hill%2Faws-puppeteer-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-hill%2Faws-puppeteer-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-hill%2Faws-puppeteer-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-hill%2Faws-puppeteer-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sean-hill","download_url":"https://codeload.github.com/sean-hill/aws-puppeteer-lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054201,"owners_count":21039952,"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-09-24T14:08:56.585Z","updated_at":"2025-04-10T20:10:42.142Z","avatar_url":"https://github.com/sean-hill.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Puppeteer Lambda\n\nExecute [puppeteer](https://github.com/GoogleChrome/puppeteer) scripts within the AWS Lambda environment.\n\n## Usage\n\n```js\nconst puppeteer = require('puppeteer')\nconst { extract, cleanup } = require('aws-puppeteer-lambda')\n\n;(async () =\u003e {\n  // Extract the headless chrome executable and return its path.\n  // If a previous Lambda invocation has extracted the executable, it will be reused.\n  const executablePath = await extract()\n  \n  // Initialize a new browser instance with puppeteer to execute within Lambda.\n  const browser = await puppeteer.launch({\n    ignoreHTTPSErrors: true,\n    args: [\n      '--disable-dev-shm-usage',\n      '--disable-gpu',\n      '--single-process',\n      '--no-zygote',\n      '--no-sandbox'\n    ],\n    executablePath\n  })\n  \n  // Run puppeteer script\n  const page = await browser.newPage()\n  await page.goto('https://example.com')\n  await page.screenshot({path: 'example.png'})\n  await browser.close()\n  \n  // Cleanup the TMP folder after each execution otherwise Chromium's\n  // garbage will cause the Lambda container to run out of space.\n  await cleanup()\n})()\n```\n\n## Test\n\n```sh\n$ npm test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-hill%2Faws-puppeteer-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsean-hill%2Faws-puppeteer-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-hill%2Faws-puppeteer-lambda/lists"}