Home icon

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


Go to article

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

Nov 22
2024
Amazon EC2 Auto Scaling introduces highly responsive scaling policies
Nov 8
2024
EC2 Auto Scaling introduces provisioning control on strict availability zone balance
Jul 30
2025
Amazon EC2 Auto Scaling adds AWS Lambda functions as notification targets for lifecycle hooks
Jul 29
2024
Amazon EC2 Fleet and EC2 Auto Scaling groups now supports aliases for Amazon Machine Images (AMIs)

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.