| 1 | # AWS Website: Astro |
| 2 | |
| 3 | Deploys an [Astro](https://astro.build) site to AWS with |
| 4 | `AWS.Website.Astro` — no `astro.config.*` adapter setup and no |
| 5 | CloudFormation templates. The server bundle runs on a streaming Lambda |
| 6 | Function URL; static assets deploy to S3 behind a CloudFront |
| 7 | distribution. |
| 8 | |
| 9 | - `src/pages/index.astro` is server-rendered in the Lambda on every |
| 10 | request and reads the `GREETING` environment value declared in |
| 11 | `alchemy.run.ts`. |
| 12 | - `src/pages/about.astro` opts into prerendering |
| 13 | (`export const prerender = true`) and is served from S3. |
| 14 | - Everything under `public/` deploys as static assets. |
| 15 | |
| 16 | The integration package must be installed in the project (it is loaded |
| 17 | dynamically at deploy time): |
| 18 | |
| 19 | ```sh |
| 20 | bun add -d @alchemy.run/frontend-frameworks |
| 21 | ``` |
| 22 | |
| 23 | ## Deploy |
| 24 | |
| 25 | ```sh |
| 26 | bun run deploy |
| 27 | ``` |
| 28 | |
| 29 | Unchanged sources skip the Astro build entirely on subsequent deploys — |
| 30 | the input files are content-hashed (scoped by `memo.include`). |
| 31 | |
| 32 | ## Destroy |
| 33 | |
| 34 | ```sh |
| 35 | bun run destroy |
| 36 | ``` |