The finished repository of the tutorial Amazon Cloudfront: Create a distribution + Lambda (tutorial).
- Build the lambda function (under
functions/*
)
pnpm run generate-assets --filter "@functions/*"
- Apply the infrastructure
export AWS_ACCESS_KEY_ID=<your-key>
export AWS_SECRET_ACCESS_KEY=<your-secret>
export AWS_DEFAULT_REGION=us-east-1
terraform init
terraform plan
terraform apply -auto-approve