{"id":19443463,"url":"https://github.com/tbeseda/astro-lambda-adapter","last_synced_at":"2025-04-25T00:32:33.481Z","repository":{"id":57663454,"uuid":"480224702","full_name":"tbeseda/astro-lambda-adapter","owner":"tbeseda","description":"Astro AWS Lambda SSR Adapter","archived":false,"fork":false,"pushed_at":"2022-04-14T19:46:40.000Z","size":21,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-07T08:13:55.376Z","etag":null,"topics":["astro","aws","lambda","ssr"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/astro-lambda-adapter","language":"TypeScript","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/tbeseda.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":"2022-04-11T04:22:01.000Z","updated_at":"2024-09-05T13:05:59.000Z","dependencies_parsed_at":"2022-09-16T19:11:15.199Z","dependency_job_id":null,"html_url":"https://github.com/tbeseda/astro-lambda-adapter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Fastro-lambda-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Fastro-lambda-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Fastro-lambda-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbeseda%2Fastro-lambda-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbeseda","download_url":"https://codeload.github.com/tbeseda/astro-lambda-adapter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223975428,"owners_count":17234737,"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":["astro","aws","lambda","ssr"],"created_at":"2024-11-10T15:43:12.371Z","updated_at":"2024-11-10T15:43:12.884Z","avatar_url":"https://github.com/tbeseda.png","language":"TypeScript","readme":"# `astro-lambda-adapter`\n\nThe primary objective here is to map a `APIGatewayProxyEventV2` received in a Lambda to an Astro/Node.js `Request` and then Astro's `Response` to `APIGatewayProxyResult`.\n\nSee [./src/server.ts](./src/server.ts).\n\n## Astro SSR AWS Lambda Adapter\n\n\u003e ⚠️ Still really early days on this one. Request `body` still unsupported. No deploys with complex Astro apps. Generally untested. Feedback and PRs welcome.\n\n```sh\nnpm i astro-lambda-adapter\n```\n\n```js\n// ./astro.config.js\nimport { defineConfig } from 'astro/config';\nimport awsAdapter from 'astro-lambda-adapter';\n\nexport default defineConfig({\n\tadapter: awsAdapter(),\n\toutDir: './myLambda/dist',\n});\n```\n\n```js\n// ./myLambda/index.mjs\nimport { handler as ssrHandler } from './dist/server/entry.mjs';\n\nexport async function handler(event) {\n\tconsole.log(`🚀 ${event.requestContext.http.method}: ${event.rawPath}`);\n\treturn await ssrHandler(event);\n}\n```\n\n```astro\n---\n// ./src/pages/index.astro\nconst RANDOM = Math.floor(Math.random() * 100) + 1;\n---\n\u003chtml lang=\"en\"\u003e\n\t\u003chead\u003e\n\t\t\u003ctitle\u003eAstro on Lambda\u003c/title\u003e\n\t\u003c/head\u003e\n\t\u003cbody\u003e\n\t\t\u003ch1\u003eAstro on Lambda\u003c/h1\u003e\n\t\t\u003cp\u003eRandom: \u003ccode\u003e{RANDOM}\u003c/code\u003e\u003c/p\u003e\n\t\u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003e 📜 This integration doesn't modify how Astro uses Vite to build and bundle your app. You may find it beneficial to [configure Vite via Astro](https://docs.astro.build/en/reference/configuration-reference/#vite) to optimize the build for Lambda.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbeseda%2Fastro-lambda-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbeseda%2Fastro-lambda-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbeseda%2Fastro-lambda-adapter/lists"}