- Newest
- Most votes
- Most comments
Yes, you can manage SSM Quick Setup configuration managers via the AWS CLI, including updating patch policy parameters. While the update-configuration-manager
command doesn't directly allow updating the specific parameters within a patch policy, you can use a combination of commands to achieve this.
Here's a general approach you can take:
-
First, use the
get-configuration-manager
command to retrieve the current configuration of the patch policy you want to update. -
Modify the retrieved configuration JSON, updating the parameters you want to change (like the cron schedules for scan and install settings).
-
Use the
update-configuration-manager
command with the modified configuration to update the patch policy.
Here's an example of how you might do this:
-
Get the current configuration:
aws ssm-quicksetup get-configuration-manager --name "your-config-manager-name"
-
Save the output to a file, modify the necessary parameters in the JSON (like the ones in your example payload).
-
Update the configuration manager with the modified JSON:
aws ssm-quicksetup update-configuration-manager --name "your-config-manager-name" --configuration-definitions file://path-to-your-modified-json-file
To perform this operation in bulk, you could create a script that iterates through your list of configuration managers, retrieves their configurations, modifies the necessary parameters, and then updates each one.
Keep in mind that changes to custom patch baselines are synchronized with Quick Setup once an hour. Also, if a custom patch baseline referenced in a patch policy is deleted, you'll need to select a new patch baseline for the affected operating system.
While this method requires some scripting, it allows you to update multiple patch policies programmatically, which is more efficient than using the UI for numerous updates.
Sources
Using the Quick Setup API to manage configurations and deployments - AWS Systems Manager
ssm-quicksetup — AWS CLI 2.21.0 Command Reference
Configure patching for instances in an organization using Quick Setup - AWS Systems Manager
Relevant content
- Accepted Answerasked a year ago
- asked a year ago
- How do I use the Microsoft KB number in Patch Manager to install a specific patch or set of patches?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- published a year ago