Blue-green deployment separates installing a release from making that release serve production traffic. The blue environment runs the current application, while a separate green environment runs the proposed replacement. Engineers validate green, prepare it for production load, and then change routing so requests reach green. Blue remains available for a defined rollback window before its resources are removed or reused. The colors are labels, not fixed lifecycle states; either environment can become the active production environment.
In cloud architectures, an environment might consist of virtual machines, container tasks, Kubernetes workloads, configuration, and supporting infrastructure. The environments need equivalent behavior and sufficient isolation, but they do not necessarily require separate accounts, clusters, or databases. Infrastructure as code helps keep networking, permissions, health checks, and configuration consistent. Validate dependency access and business transactions as well as basic process health before promotion.
For example, an Amazon ECS application can run its current and replacement task sets behind separate load balancer target groups. A deployment workflow starts the replacement tasks, waits for health checks, optionally exposes a test listener, and then shifts production traffic. With Amazon EKS, engineers can run separate Deployments for the two versions and switch a Kubernetes Service selector or ingress routing configuration. A Kubernetes rolling update is not automatically blue-green: it normally replaces replicas incrementally rather than retaining two separately promotable versions.
Each environment should satisfy the application's Availability Zone resilience requirements independently. Distribute tasks or pods across zones and ensure the receiving environment can handle production traffic with the required failure headroom. Check compute quotas, IP address capacity, load balancer configuration, and autoscaling limits before creating the replacement. Duplicating application capacity temporarily increases cost, and shared databases or external APIs may experience additional load during testing and warm-up.
Blue-green deployment can also support a release between AWS Regions, but it does not itself provide multi-Region resilience. The destination Region needs working dependencies, secrets, certificates, sufficient capacity, and an appropriate data replication design. Define recovery time and acceptable data loss, account for replication lag, and control which Region can accept writes. DNS-based cutover is not instantaneous because resolvers and clients cache answers; routing changes also do not move established connections.
State is usually the hardest part of rollback. Both application versions may share a database, so use backward-compatible expand-and-contract schema changes and postpone destructive migrations until the rollback window closes. Switching traffic back does not reverse writes already made by the new version. Externalize session state where appropriate, drain connections deliberately, and handle background workers separately to avoid unintended concurrent processing or duplicate side effects.
Finally, define promotion and rollback criteria using error rates, latency, resource saturation, and business metrics. Retaining blue makes recovery faster only while it remains healthy, adequately provisioned, and compatible with current data. Blue-green describes the environment arrangement; canary and linear strategies describe gradual traffic exposure and can be combined with it. Neither the pattern nor an all-at-once routing change guarantees zero downtime, so test cutover, rollback, and failure behavior under realistic load.