Summary
In this chapter, you created a comprehensive auto scaling solution that allows you to auto scale your ECS services and applications in response to application load and customer demand, and at the same time ensures your underlying ECS cluster has sufficient resources to deploy new ECS tasks as required.
You first learned about key ECS resources including CPU, memory, network ports and network interfaces, and how ECS allocates these resources. When managing the ECS cluster capacity, these resources determine whether or not an ECS container instance can run a given ECS task, so it is critical that you understand how each resource is consumed.
You next implemented an ECS cluster-capacity management solution that calculates the ECS cluster capacity whenever an ECS container instance state change occurs. ECS publishes theses state changes via CloudWatch events, and you created a CloudWatch event rule that triggers a Lambda function that calculates the current cluster capacity. This function...