SST AWS
Environment variable configuration for SST AWS deployment
This configuration is ideal for enterprise-grade infrastructure with AWS services and compliance requirements. SST provides Infrastructure as Code with AWS Lambda, RDS, S3, and other AWS services.
🚀 Core Application Settings
Variable | Description | Example | Required |
---|---|---|---|
BETTER_AUTH_SECRET | Secret key for Better Auth session encryption | your-32-character-secret-key | ✅ |
BETTER_AUTH_URL | Base URL of your application | https://yourdomain.com | ✅ |
NEXT_PUBLIC_APP_URL | Public URL for client-side usage | https://yourdomain.com | ✅ |
📧 Email Configuration
Variable | Description | Example | Required |
---|---|---|---|
RESEND_API_KEY | API key for Resend email service | re_123456789 | ✅ |
RESEND_AUDIENCE_ID | Audience ID for newsletter functionality | aud_123456789 | ❌ |
🔐 OAuth Provider Settings
GitHub OAuth
Variable | Description | Example | Required |
---|---|---|---|
GITHUB_CLIENT_ID | GitHub App Client ID | Iv1.a629723d24c123456 | ❌ |
GITHUB_CLIENT_SECRET | GitHub App Client Secret | abc123def456ghi789jkl012 | ❌ |
Google OAuth
Variable | Description | Example | Required |
---|---|---|---|
GOOGLE_CLIENT_ID | Google OAuth Client ID | 123456789-abc123.apps.googleusercontent.com | ❌ |
GOOGLE_CLIENT_SECRET | Google OAuth Client Secret | GOCSPX-abc123def456ghi789 | ❌ |
💳 Payment Integration (Stripe)
Variable | Description | Example | Required |
---|---|---|---|
STRIPE_SECRET_KEY | Stripe secret key for server-side operations | sk_test_123... or sk_live_123... | ❌ |
STRIPE_WEBHOOK_SECRET | Webhook endpoint secret for Stripe events | whsec_123456789 | ❌ |
NEXT_PUBLIC_PRICE_ID_PRO_MONTHLY | Stripe price ID for monthly pro plan | price_123456789 | ❌ |
NEXT_PUBLIC_PRICE_ID_PRO_YEARLY | Stripe price ID for yearly pro plan | price_987654321 | ❌ |
NEXT_PUBLIC_PRICE_ID_LIFETIME | Stripe price ID for lifetime plan | price_555666777 | ❌ |
📁 Storage Configuration
Variable | Description | Example | Required |
---|---|---|---|
NEXT_PUBLIC_AVATARS_BUCKET_NAME | S3 bucket name for avatar uploads | my-app-avatars | ❌ |
☁️ AWS Infrastructure Settings
Variable | Description | Example | Required |
---|---|---|---|
AWS_ACCESS_KEY_ID | AWS access key for infrastructure management | AKIAIOSFODNN7EXAMPLE | ✅ |
AWS_SECRET_ACCESS_KEY | AWS secret key for authentication | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | ✅ |
🌍 Cloudflare Integration (Optional, if you want to use Cloudflare dns)
Variable | Description | Example | Required |
---|---|---|---|
CLOUDFLARE_API_TOKEN | Cloudflare API token for DNS management | abc123def456ghi789jkl012 | ❌ |
CLOUDFLARE_DEFAULT_ACCOUNT_ID | Cloudflare account ID for DNS services | a1b2c3d4e5f6g7h8i9j0 | ❌ |
Secret
You can use the sst secret
command to manage secrets.
npx sst secret set BETTER_AUTH_SECRET xxx
npx sst secret set STRIPE_SECRET_KEY xxx
npx sst secret set RESEND_API_KEY xxx