View a markdown version of this page

Required resources for Amazon ECS blue/green deployments - Amazon Elastic Container Service

Required resources for Amazon ECS blue/green deployments

You can use Amazon ECS blue/green deployments with or without managed traffic shifting. When your service uses Elastic Load Balancing or Service Connect, Amazon ECS manages the traffic shift between the blue and green service revisions for you. If your service doesn't use a load balancer or Service Connect (headless service), you can still use blue/green deployments for controlled rollouts, but Amazon ECS doesn't manage the traffic shift automatically.

For managed traffic shifting, configure one of the following:

  • Elastic Load Balancing

  • Service Connect

The following list provides a high-level overview of what you need to configure for Amazon ECS blue/green deployments:

Best practices

Follow these best practices for successful Amazon ECS blue/green deployments:

  • Configure appropriate health checks that accurately reflect your application's health.

  • Set a bake time that allows sufficient testing of the green deployment.

  • Implement CloudWatch alarms to automatically detect issues and trigger rollbacks.

  • Use lifecycle hooks to perform automated testing at each deployment stage.

  • Ensure your application can handle both blue and green service revisions running simultaneously.

  • Plan for sufficient cluster capacity to handle both service revisions during deployment.

  • Test your rollback procedures before implementing them in production.