Back to results for “CI/CD”
AWS › AWS Elastic Beanstalk

How does Elastic Beanstalk support blue green deployments using environment swapping?

Intermediate

Answer

Elastic Beanstalk supports a blue green deployment approach by letting you create a brand new environment running the updated application version alongside your existing live environment, thoroughly test the new environment while it is completely separate from production traffic, and then perform a CNAME swap that instantly redirects traffic from the old environment to the new one, with the ability to swap back immediately if any problem is discovered after the switch.
eb swap old-environment-name --destination-name new-environment-name
Real-world example A company preparing a major application update creates a completely new Elastic Beanstalk environment for the updated version, thoroughly validates it separately from live traffic, then performs a CNAME swap to instantly cut production traffic over, keeping the old environment ready as an instant rollback option.

Common follow-ups: How quickly does traffic switch over after performing a CNAME swap?;What happens to the old environment after a successful swap?