AWS LAMBDA: FAAS TRICKS TO MANAGE AUTOSCALING GROUPS
summary
A concrete pattern for graceful shutdown of worker fleets: Auto Scaling lifecycle hooks invoke an AWS Lambda that pauses instance termination, then uses SSM Run Command or containerized one-shot tasks to drain in-flight jobs from SQS-backed workers. The demo uses Elastic Beanstalk/EC2 workers with average job times of 20–30s and waits up to five minutes to finish work, leveraging SQS visibility timeouts to avoid lost messages and reduce failed jobs with minimal extra cost.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 2:09Auto Scaling Groups basics
- 3:12Lifecycle hooks in ASG
- 5:18SQS version issues
- 7:01Downtime during scaling
- 8:48Debugging lifecycle hooks
- 10:42SSM commands for Lambda
- 11:49Lambda post-scaling actions
- 13:17Lambda limits and ECS fix
- 14:42Fargate benefits for temp tasks
- 15:46Lambda and Fargate use cases
- 17:13Advanced Fargate features
- 18:16Conclusion
related talks
47mReal Use Cases for Using AWS Lambda for Infrastructure Tasks
35mEfficiency of Serverless Architectures with AWS Solutions
01h 00mServerless Architecture - Tales from a world without servers
58mAWS Lambda and Serverless Framework Deep dive
22mS3 & Lambda - flexible pattern at the core of serverless applications
48mServerless design patterns
43mServerless in Java Lessons learnt
25mBuilding advanced workflows with AWS Step Functions
