Course contentsShow
← Cloud and Infrastructure
Lesson 294 of 2,9896. Auto ScalingFree lesson

Health Check Types

Understanding EC2 status checks, ELB health checks, and custom health checks for instance replacement.

Health Check Types

What you'll learn: How AWS Auto Scaling uses different types of health checks to decide when to replace unhealthy instances.

Why Health Checks Matter

When Auto Scaling manages your instances, it needs to know which ones are healthy and which should be terminated and replaced. Think of health checks as a doctor's examination—different tests reveal different problems. Using the right health check ensures your Auto Scaling group maintains truly healthy instances, not just ones that are technically "running."

The Three Types of Health Checks

EC2 Status Checks

This is the default health check type. AWS monitors the underlying hardware and virtualization layer. If an instance fails to pass EC2 system status checks or instance status checks (think hardware failures, network problems, or corrupted file systems), Auto Scaling marks it unhealthy and replaces it.

Limitation: It only knows if the instance itself is running—not if your application inside is working properly.

ELB Health Checks

When your Auto Scaling group is attached to a load balancer (ALB or NLB), you can enable ELB health checks. The load balancer actively pings your application's health endpoint (like /health). If your app stops responding correctly, the instance is marked unhealthy and replaced.

Advantage: This monitors your actual application, not just the VM.

Custom Health Checks

You can programmatically set instance health using the AWS API or CLI. This lets you implement your own monitoring logic—maybe checking database connectivity, memory usage, or business-critical processes—and tell Auto Scaling when an instance should be replaced.

Choosing the Right Type

Use EC2 checks for basic infrastructure monitoring. Enable ELB checks when your instances serve traffic through a load balancer. Add custom checks for application-specific health logic.

Key Takeaway: Health check types determine what Auto Scaling monitors—EC2 checks watch infrastructure, ELB checks watch application responses, and custom checks let you define your own criteria for instance health.