An adapter for deploying an Astro application to AWS Lambda
npm install @astro-aws/adapterAn Astro adapter for building an SSR application and deploying it to AWS Lambda.
``shUsing NPM
npx astro add @astro-aws/adapter
$3
1. Install the package.
`
Using NPM
npm install -D @astro-aws/adapterUsing Yarn
yarn add -D @astro-aws/adapterUsing PNPM
pnpm add -D @astro-aws/adapterUsing Bun
bun add -D @astro-aws/adapter
`2. Add the following to your
astro.config.mjs file.`js
import { defineConfig } from "astro/config"
import astroAws from "@astro-aws/adapter"export default defineConfig({
output: "server",
adapter: astroAws(),
})
`$3
1. Install the package.
`
Using NPM
npm install -D @astro-aws/adapterUsing Yarn
yarn add -D @astro-aws/adapterUsing PNPM
pnpm add -D @astro-aws/adapterUsing Bun
bun add -D @astro-aws/adapter
`2. Add the following to your
astro.config.mjs file.`js
import { defineConfig } from "astro/config"
import astroAws from "@astro-aws/adapter"export default defineConfig({
output: "server",
adapter: astroAws({
mode: "ssr",
}),
})
`$3
1. Install the package.
`
Using NPM
npm install -D @astro-aws/adapterUsing Yarn
yarn add -D @astro-aws/adapterUsing PNPM
pnpm add -D @astro-aws/adapterUsing Bun
bun add -D @astro-aws/adapter
`2. Add the following to your
astro.config.mjs file.`js
import { defineConfig } from "astro/config"
import astroAws from "@astro-aws/adapter"export default defineConfig({
output: "server",
adapter: astroAws({
mode: "ssr-stream",
}),
})
`$3
> NOTE: Environment variables are not supported in edge mode. Due to the limitations of AWS Lambda@Edge.
1. Install the package.
`
Using NPM
npm install -D @astro-aws/adapterUsing Yarn
yarn add -D @astro-aws/adapterUsing PNPM
pnpm add -D @astro-aws/adapterUsing Bun
bun add -D @astro-aws/adapter
`2. Add the following to your
astro.config.mjs file.`js
import { defineConfig } from "astro/config"
import astroAws from "@astro-aws/adapter"export default defineConfig({
output: "server",
adapter: astroAws({
mode: "edge",
}),
})
``