Manage AMI updates for AWS Auto Scaling groups with AWS Lambda and AWS Systems Manager
AWS Cloud Operations Blog
This article provides a solution for automatically updating Amazon Machine Images (AMIs) used by AWS Auto Scaling groups. It leverages AWS Systems Manager Automation, AWS Lambda, and Parameter Store to create a pipeline that patches the current AMI, creates a new AMI, and updates the AMI ID stored in Parameter Store. Auto Scaling groups can then reference this updated AMI ID to launch new instances with the latest patched AMI.
Specifically, the article covers:
- Solution overview and architecture
- Prerequisites and setup steps
- Deploying a CloudFormation template
- Creating a Parameter Store parameter for the AMI ID
- Creating an AWS Lambda function to update the Parameter Store
- Updating the Auto Scaling group's launch template to reference the Parameter Store AMI ID
- Creating and running an AWS Systems Manager Automation runbook to patch the AMI and update the Parameter Store
- Optional: Setting up notifications for Parameter Store events
- Cleanup instructions
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
2024
2024
2025
2024
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.