ECS life cycle management solution

Now that you have some background of ECS life cycle management, let's discuss the solution that you will implement in this chapter, which will leverage EC2 life cycle hooks to trigger ECS container instance draining and signal the EC2 Auto Scaling service when it is safe to terminate your ECS container instances.

The following diagram illustrates a simple EC2 Auto Scaling group and an ECS cluster with two ECS container instances in service, supporting ECS Service A and ECS Service B, which both have two ECS tasks or instances of the ECS service running:

In Service EC2 Auto Scaling Group/ECS Cluster

Let's ...

Get Docker on Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.