Chef Server with AWS Lambda and CloudWatch Events

If you’re struggling with cleaning up terminated instances registered with third-party services, you can use a combination of several AWS services to help out. A common example is dealing with the remnants of terminated instances from Auto Scaling groups.  Throughout this post, I’ll talk about how you can use AWS Lambda and Amazon CloudWatch Events to automatically remove instances from Chef Server when an EC2 Instance is terminated.  Though I’ll discuss a specific use case around Chef Server, you can also apply this pattern to other, similar situations where this might be useful.

via Automatically Delete Terminated Instances in Chef Server with AWS Lambda and CloudWatch Events | AWS Partner Network (APN) Blog