Local dev quickstart
This tutorial shows how to fetch a JSON secret and run your app locally with environment variables injected.
- Create a JSON secret
aws secretsmanager create-secret --name my/local/app --region us-east-1 --secret-string '{"DATABASE_URL":"postgres://user:pass@localhost:5432/db","API_KEY":"abc123"}'
- Start your app with
env-secrets
env-secrets aws -s my/local/app -r us-east-1 -- npm run dev
- Confirm variables are present
env | grep -E 'DATABASE_URL|API_KEY'