Skip to main content

Green-Blue Deployment via Route 53

ยท 2 min read
Trapenok Viktor
Maintainer of Unifie

Green-Blue deployment is a strategy where you have two versions of your application:

  • Blue (current stable version)
  • Green (new version)

With Route 53, you can implement this using a simple DNS switch.

๐Ÿ›  How to Set It Upโ€‹

  1. Deploy two versions of your application

    • Run two environments (e.g., EC2 instances, ECS services, or ALBs) with different versions.
  2. Create two DNS records in Route 53

    • blue.example.com โ†’ Old version
    • green.example.com โ†’ New version
  3. Set up the main DNS record

    • Create a CNAME record app.example.com pointing to the current stable version (blue.example.com).
  4. Switch to the new version

    • Once the new version is ready, update app.example.com to point to green.example.com.
  5. Rollback if needed

    • If something goes wrong, simply switch back to blue.example.com.

โณ Minimal TTL for Faster Updatesโ€‹

To reduce switching delays, set a low TTL (e.g., 60 seconds) on your DNS records. This ensures changes propagate quickly when you update Route 53.

๐Ÿ“Œ Pros: Simple setup, quick rollback, no complex tools required.
โ— Cons: DNS propagation depends on TTL, no automated testing before switching.

This method is ideal for deployments where occasional manual updates are acceptable.

k3s architecture on a single node with embedded database