Question

Difficulty: HardPatch Management and OS Compliance Automation

A SysOps Administrator is tasked with setting up automated patch management for a fleet of Amazon Linux 2 EC2 instances. The organization requires that a custom patch baseline be applied to these instances during a specific weekly maintenance window. The patching process must target only the instances configured with the patch group 'Prod-Linux'. Arrange the following steps in the correct chronological sequence to configure this automated workflow.

  1. 1Create a custom patch baseline with the required approval rules for Amazon Linux 2.
  2. 2Tag the target EC2 instances using the case-sensitive key 'Patch Group' and value 'Prod-Linux'.
  3. 3Associate the 'Prod-Linux' patch group with the newly created custom patch baseline.
  4. 4Create a Maintenance Window and register the target instances using the 'Patch Group' tag.
  5. 5Register a Task in the Maintenance Window to execute the 'AWS-RunPatchBaseline' SSM document.

Answer

The correct sequence starts with creating the custom patch baseline, followed by tagging the instances with the case-sensitive 'Patch Group' tag, associating that patch group with the baseline, creating the Maintenance Window with registered targets, and registering the Run Command task to execute the AWS-RunPatchBaseline document.
The correct sequence begins with creating the custom patch baseline first to define approval rules. Next, target EC2 instances are tagged with the case-sensitive 'Patch Group' tag. The patch group is then registered with the custom baseline so Patch Manager maps the instances to this baseline instead of the default. After that, a Maintenance Window is defined, and the instances are registered as targets using their patch group tags. Finally, the task is registered in the Maintenance Window to run the 'AWS-RunPatchBaseline' SSM document on the registered targets.

Step-by-Step Solution

1
Create a custom patch baseline.
A custom patch baseline exists with defined rules for Amazon Linux 2.
Custom baselines must be defined before they can be configured with specific patch groups.
2
Tag EC2 instances with the key 'Patch Group' and value 'Prod-Linux'.
Instances are categorized into the patch group.
Systems Manager relies on the case-sensitive 'Patch Group' tag to map instances to baselines.
3
Associate the 'Prod-Linux' patch group with the custom baseline.
The custom baseline is mapped to the 'Prod-Linux' group.
This mapping overrides the default patch baseline for these instances.
4
Create a Maintenance Window and register targets using the 'Patch Group' tag.
A defined maintenance schedule and its target instances are configured.
Targets must be registered with the window before a task can execute on them.
5
Register a task running 'AWS-RunPatchBaseline' within the Maintenance Window.
A task is configured to execute during the window.
This schedules the patching command to execute on the registered targets during the specified schedule.

Key Concept

Automated operating system patching using Systems Manager Patch Manager, custom baselines, patch groups, and maintenance windows.
Estimated Time:2m 0s
Rate this question