Skip to content

Commit abb919f

Browse files
committed
docs: document Amplify env var baking requirement (prevent future breakage)
1 parent 5283a55 commit abb919f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/SETUP_GUIDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ Environment variables are configured in the Amplify Console:
3434

3535
> **Warning**: `aws amplify update-app --environment-variables` REPLACES the entire map. Always pass ALL vars when using the CLI. Use the Amplify Console UI for safer edits.
3636
37+
### CRITICAL: next.config.ts env: Block
38+
39+
**Amplify WEB_COMPUTE does NOT inject env vars into the Lambda runtime at request time.** Every env var needed by API routes MUST be listed in the `next.config.ts env:` block to be baked at build time. This includes secrets (`APP_ACCESS_KEY_ID`, `APP_SECRET_ACCESS_KEY`, `GOOGLE_CLIENT_SECRET`).
40+
41+
**Never remove ANY variable from the `env:` block** without verifying the Lambda can still read it. Removing credentials broke DynamoDB, Bedrock, Polly, and auth — twice (2026-04-05).
42+
3743
## Testing
3844

3945
```bash

0 commit comments

Comments
 (0)