1# AWS Static Site Example
2
3This example deploys a static website from the local `site/` directory using:
4
5- `AWS.Website.StaticSite`
6- private S3 origin
7- CloudFront distribution
8- optional ACM certificate in `us-east-1`
9- optional Route 53 alias records
10
11## Commands
12
13```sh
14bun install
15bun run --filter aws-static-site-example deploy
16```
17
18## Optional Custom Domain
19
20Set these environment variables before deploy:
21
22```sh
23export WEBSITE_DOMAIN=www.example.com
24export WEBSITE_ZONE_ID=Z1234567890
25export WEBSITE_ALIASES=example.com,static.example.com
26```
27
28When `WEBSITE_DOMAIN` and `WEBSITE_ZONE_ID` are provided, the example will:
29
30- request an ACM certificate
31- create Route 53 validation records
32- create Route 53 alias records to CloudFront
33
34Without them, the example still deploys and returns the CloudFront URL.