Automated GitHub Self-Hosted Runner Cleanup: Lambda Functions and Auto Scaling Lifecycle Hooks
When an EC2 instance in an Auto Scaling Group shuts down, event-driven plumbing kicks in. Alifecycle hookcatches the scale-in, fires off an SNS notification, and triggers aLambda. That Lambda calls the GitHub API to yank the self-hosted runner before the instance dies. No dangling runners. No manual..