Skill 5.4.4

Design automated failure recovery solutions that use health checks and replacement strategies (for example, by using Auto Scaling health checks, Amazon ECS task replacement, AWS Lambda retry policies).

Key Concepts

Use health checks at every layer: ELB health checks with Auto Scaling replacement, ECS service scheduler restarting tasks, Route 53 health checks with failover records, RDS Multi-AZ and Aurora automatic failover, and EC2 auto-recovery for impaired hardware.

Automate responses with CloudWatch alarms and EventBridge rules triggering Lambda or Systems Manager Automation runbooks; design for static stability so remaining capacity handles load when an AZ fails; decouple with queues so downstream outages do not lose work.

Replacement strategies: Auto Scaling groups with ELB health checks replace instances that fail application checks, not only EC2 status checks; ECS services replace stopped or unhealthy tasks to maintain the desired count, using container and load balancer health checks; EKS restarts containers that fail liveness probes. Lambda retry policies: asynchronous invocations retry twice by default (configurable from zero to two, with a maximum event age) and then send the event to an on-failure destination or DLQ; event source mappings for streams can bisect batches, limit retries and report partial batch failures.