This is a robust but simple cli script to check Lambda health using most efficient way. It verifies Lambda health using two distinct signals:
- Configuration State: Is the function Active and Successful? (Deployability check)
- Runtime Health: Has it generated Errors in CloudWatch recently? (Operational check)
This script retrieves all functions (or filters by a pattern), checks their deployment state, and queries CloudWatch for error metrics over the last 10 minutes.