{"id":14965729,"url":"https://github.com/jupiterone/playwright-aws-lambda","last_synced_at":"2025-04-08T08:16:36.601Z","repository":{"id":38094138,"uuid":"239975303","full_name":"JupiterOne/playwright-aws-lambda","owner":"JupiterOne","description":"Support for running Microsoft's Playwright on AWS Lambda and Google Cloud Functions","archived":false,"fork":false,"pushed_at":"2024-07-25T19:20:45.000Z","size":85408,"stargazers_count":414,"open_issues_count":24,"forks_count":53,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-07T07:37:40.897Z","etag":null,"topics":["aws","cloud","function","google","lambda","playwright","puppeteer"],"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/JupiterOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-12T09:37:30.000Z","updated_at":"2025-03-24T06:27:15.000Z","dependencies_parsed_at":"2024-11-14T13:48:12.846Z","dependency_job_id":null,"html_url":"https://github.com/JupiterOne/playwright-aws-lambda","commit_stats":{"total_commits":48,"total_committers":18,"mean_commits":"2.6666666666666665","dds":0.7291666666666667,"last_synced_commit":"0d58f9e67fb2e5feb08710e34bf37666383aa185"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterOne%2Fplaywright-aws-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterOne%2Fplaywright-aws-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterOne%2Fplaywright-aws-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterOne%2Fplaywright-aws-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JupiterOne","download_url":"https://codeload.github.com/JupiterOne/playwright-aws-lambda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801175,"owners_count":20998339,"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":["aws","cloud","function","google","lambda","playwright","puppeteer"],"created_at":"2024-09-24T13:35:12.133Z","updated_at":"2025-04-08T08:16:36.575Z","avatar_url":"https://github.com/JupiterOne.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# playwright-aws-lambda\n\n![CI](https://github.com/JupiterOne/playwright-aws-lambda/workflows/CI/badge.svg)\n[![NPM](https://img.shields.io/npm/v/playwright-aws-lambda)](https://www.npmjs.com/package/playwright-aws-lambda)\n\nSupport for Playwright running on AWS Lambda and Google Cloud Functions.\n\n**NOTE**: Currently only Chromium is supported.\n\n## Install\n\n```shell\nnpm install playwright-core playwright-aws-lambda --save\n```\n\n## Usage\n\nThis package works with the `nodejs10.x`, `nodejs12.x`, `nodejs14.x`, `nodejs16.x`, `nodejs18.x` and `nodejs20.x` AWS Lambda runtimes\nout of the box.\n\n```javascript\nconst playwright = require('playwright-aws-lambda');\n\nexports.handler = async (event, context) =\u003e {\n  let browser = null;\n\n  try {\n    browser = await playwright.launchChromium();\n    const context = await browser.newContext();\n\n    const page = await context.newPage();\n    await page.goto(event.url || 'https://example.com');\n\n    console.log('Page title: ', await page.title());\n  } catch (error) {\n    throw error;\n  } finally {\n    if (browser) {\n      await browser.close();\n    }\n  }\n};\n```\n\n## API\n\n| Method / Property | Returns                                  | Description                           |\n| ----------------- | ---------------------------------------- | ------------------------------------- |\n| `launchChromium`  | `{!Promise\u003cplaywright.ChromiumBrowser\u003e}` | Launches the Chromium browser.        |\n| `loadFont(url)`   | `{Promise\u003cvoid\u003e}`                        | Downloads and activates a custom font |\n\n### Loading additional fonts\n\nIf you need custom font support by e.g. emojicons in your browser, you have to\nload it by using the `loadFont(url: string)` function before you launch the\nbrowser.\n\n```js\nawait loadFont(\n  'https://raw.githack.com/googlei18n/noto-emoji/master/fonts/NotoColorEmoji.ttf'\n);\n```\n\n## Thanks / Credits\n\nThis project is based on the work of\n[chrome-aws-lambda](https://github.com/alixaxel/chrome-aws-lambda).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupiterone%2Fplaywright-aws-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjupiterone%2Fplaywright-aws-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupiterone%2Fplaywright-aws-lambda/lists"}