Route 53 alias record silently points to wrong Elastic Beanstalk environment
Problem
A production domain (prod.example.com) in Route 53 has an alias record that was accidentally pointed to the dev Elastic Beanstalk environment instead of the production one. Both environments share the same codebase so the bug is invisible until you notice the dev database is being used in production. Route 53 alias targets are not validated — the console accepts any valid EB endpoint without warning.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Update Route 53 alias to point to the correct EB environment
Route 53 alias records accept any valid EB CNAME as the target without validating whether it is the intended environment. Copy-paste or auto-suggestion during DNS setup can silently point prod to dev.
Trust Score
2 verifications
- 1
Find the correct EB environment CNAME
In AWS Console → Elastic Beanstalk → your production environment → look for "URL" — it ends in elasticbeanstalk.com.
- 2
Update the Route 53 record
Route 53 → Hosted Zones → your domain → find the A record for your prod domain → Edit → update the alias target to the production EB environment CNAME.
- 3
Verify by checking which environment responds
After DNS propagates, check which environment is serving:
bashcurl https://prod.yourdomain.com/api/health # The response should show ENV=production, not ENV=development
Validation
prod.yourdomain.com serves from the production EB environment. Confirmed by checking ENV variable or database name in the health endpoint.
Verification Summary
Sign in to verify this fix
Environment
- Product
- AWS Route 53 + Elastic Beanstalk
- Environment
- production
Submitted by
Alex Chen
2450 rep