You are currently viewing How To Patch A Linux Instance Using AWS SSM Patch Manager

How To Patch A Linux Instance Using AWS SSM Patch Manager

How To Patch A Linux Instance Using AWS SSM Patch Manager

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed how to create AWS SSM Maintenance Windows.

In this blog post, we will discuss how to patch a Linux instance using AWS SSM patch manager.

What Is AWS SSM Patch Manager:

AWS Systems Manager Patch Manager automates the process of patching managed instances with both security related and other types of updates. You can use Patch Manager to apply patches for both operating systems and applications. (On Windows Server, application support is limited to updates for Microsoft applications.) You can use Patch Manager to install Service Packs on Windows instances and perform minor version upgrades on Linux instances. You can patch fleets of EC2 instances or your on-premises servers and virtual machines (VMs) by operating system type. This includes supported versions of Windows Server, Amazon Linux, Amazon Linux 2, CentOS, Debian Server, Oracle Linux, Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise Server (SLES), and Ubuntu Server.

Patch Manager uses patch baselines, which include rules for auto-approving patches within days of their release, as well as a list of approved and rejected patches. You can install patches on a regular basis by scheduling patching to run as a Systems Manager maintenance window task. You can also install patches individually or to large groups of instances by using Amazon EC2 tags.  You can add tags to your patch baselines themselves when you create or update them.

What Is A Patch Baseline In AWS SSM Patch Manager:

A patch baseline defines which patches are approved for installation on your instances. You can specify approved or rejected patches one by one. You can also create auto-approval rules to specify that certain types of updates (for example, critical updates) should be automatically approved. The rejected list overrides both the rules and the approve list.

Patch Manager provides predefined patch baselines for each of the operating systems supported by Patch Manager. You can use these baselines as they are currently configured (you can’t customize them) or you can create your own custom patch baselines. Custom patch baselines allows you greater control over which patches are approved or rejected for your environment.

What Is A Patch Group In AWS SSM Patch Manager:

You can use a patch group to associate instances with a specific patch baseline. Patch groups help ensure that you are deploying the appropriate patches, based on the associated patch baseline rules, to the correct set of instances. Patch groups can also help you avoid deploying patches before they have been adequately tested. For example, you can create patch groups for different environments (such as Development, Test, and Production) and register each patch group to an appropriate patch baseline.

How To Patch A Linux Instance Using AWS SSM Patch Manager:


AWS CLI installed and configured. You can follow the below blog post to install and configure AWS CLI.

Step 1: Create an EC2 SSM Managed Linux Instance.

Step 2: Create a new custom patch baseline.

Step 3: Register a patch group to the patch baseline.

Step 4: Create a new SSM Maintenance Window.

Step 5: Get the Maintenance Window execution data.

Step 6: Get patching details.

Step 7: Cleanup.

Hope you have enjoyed this blog post, to get more details on AWS SSM, please refer below AWS documentation


Leave a Reply