Certopolis

AWS Certified DevOps Engineer – Professional

Patch Manager patch baselines, patch groups and Scan vs Install

A patch baseline defines which patches are approved for a node. The Systems Manager User Guide says predefined baselines cannot be customized, so different approval delays or rejected patches need a custom baseline. A node uses the baseline registered for its patch group, or the default baseline for its operating system if it has no patch group.

Predefined vs custom patch baselines

Patch Manager provides a predefined baseline for each supported operating system, and these act as the defaults. You can use them as they are but cannot change them. The predefined baselines auto-approve patches 7 days after release. For Windows Server, installing a patch within 7 days of release requires a custom baseline.

A custom baseline has approval rules that select patches by classification and severity. Each rule takes either an auto-approval delay or an approval cutoff date. The delay is the number of days after a patch is released or last updated before it is approved, so a rule with a 7-day delay approves a patch released on July 7 on July 14. Because the delay is counted per patch, the rule needs no monthly upkeep.

A custom baseline can be made the default for its operating system. It can also set a compliance severity level, which predefined baselines leave as Unspecified. A patch listed as both approved and rejected in one baseline is rejected.

How does a node choose its baseline?

A patch group is defined by a tag with the key Patch Group or PatchGroup on the managed node. You register the patch group with a baseline. When patching runs, SSM Agent checks the node for a patch group value. If the group has a registered baseline, that baseline is used. If the node has no patch group, the current default baseline is used.

A managed node can be in only one patch group, and a patch group can be registered with only one baseline for each operating system type. If tags are allowed in EC2 instance metadata, the key must be PatchGroup without a space. Patch groups are not used by patch policies in Quick Setup.

Scan vs Install in AWS-RunPatchBaseline

AWS-RunPatchBaseline requires the Operation parameter, set to Scan or Install. Scan works out the node's patch compliance state and reports which approved, applicable updates are missing. It installs nothing and does not reboot the node.

Install attempts to install the approved and applicable updates that are missing. RebootOption defaults to RebootIfNeeded. Set it to NoReboot to keep the node from rebooting after patching.

InstallOverrideList points to a YAML list of patches that overrides the baseline for one install. Scan operations ignore it, so compliance reports always reflect the baseline.

Where the exam catches people

  • Believing a predefined baseline can be edited to change its approval delay: predefined baselines cannot be customized. Create a custom baseline.
  • Believing a node with no patch group tag is skipped: it is patched against the default baseline for its operating system.
  • Believing a node can belong to two patch groups: a managed node can be in only one.
  • Believing a Scan installs missing patches or reboots: it only reports compliance.
  • Believing a patch on both the approved and rejected lists is installed: the rejection wins.

Written from these sources

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A company runs 300 Amazon EC2 instances on Windows Server 2022 as AWS Systems Manager managed nodes in one account and Region. A maintenance window installs patches every night with AWS-RunPatchBaseline, and the nodes use AWS-DefaultPatchBaseline. A new security policy requires critical security updates to be installed no later than two nights after Microsoft releases them, while all other approved updates must wait 14 days after release. Once the change is in place, nobody may have to adjust the patching setup from month to month. What should a DevOps engineer do to meet these requirements?

    Right. In the game that’s Renown for your Configuration Management and IaC building.

    Not that one: D is right. In the game your Configuration Management and IaC building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    One rule approves Critical SecurityUpdates 2 days after release and another approves the rest after 14 days. Because an auto-approval delay is counted from each update's own release date, the rules keep working every month without anyone touching them, and making the baseline the Windows default puts all 300 nodes on it.

    Written from docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-predefined-and-custom-patch-baselines.html

  2. A company has patched its Windows Server Amazon EC2 instances with AWS Systems Manager Patch Manager since 2021. A maintenance window runs AWS-RunPatchBaseline every Saturday on every instance tagged Env=prod, and every instance is patched from AWS-DefaultPatchBaseline, the default baseline for Windows Server. A new fleet of Microsoft SQL Server hosts, launched by an Auto Scaling group whose launch template adds the Env=prod tag, must also receive SQL Server updates from a new custom patch baseline, including hosts launched later. Every other instance must keep receiving the updates it gets today. What should a DevOps engineer do to meet these requirements?

    Right. In the game that’s Renown for your Configuration Management and IaC building.

    Not that one: A is right. In the game your Configuration Management and IaC building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Registering the new baseline for the group sql and putting PatchGroup=sql in the launch template sends every SQL Server host, including future ones, to the new baseline, while the existing window and every untagged instance carry on with AWS-DefaultPatchBaseline. The account has used patch groups since 2021, so the feature is available to it.

    Written from docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-patch-groups.html

  3. A company runs 300 Amazon Linux 2023 instances as AWS Systems Manager managed nodes. Application teams patch their own instances by hand, and Systems Manager has never patched them. The DevOps team has created a custom patch baseline, now the account's default baseline for Amazon Linux 2023, that becomes the company standard next quarter. Before then, auditors want a report showing, for each instance, the specific updates it would still need in order to match that baseline. Producing the report must not change any instance. Which solution will meet these requirements?

    Right. In the game that’s Renown for your Configuration Management and IaC building.

    Not that one: C is right. In the game your Configuration Management and IaC building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Each node is scanned against the baseline that applies to it, which here is the new custom default, so the compliance results list, instance by instance, the updates still needed.

    Written from docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-aws-runpatchbaseline.html

Ask for something