Using Console
Using CLI
AmazonSSMManagedInstanceCore
managed policy attached.Using Python
INSTANCE_ID_1
, INSTANCE_ID_2
: Replace these with the actual EC2 instance IDs for which you want to schedule patch installations.MAINTENANCE_WINDOW_ID
: Replace this with the ID of the maintenance window in which you want to schedule the patch installations.MAINTENANCE_WINDOW_ROLE_ARN
: Replace this with the ARN of the IAM role that has permissions to run Systems Manager tasks in the maintenance window.DOCUMENT_HASH
: Replace this with the hash of the AWS-RunPatchBaseline document. You can get this from the Systems Manager Documents page in the AWS Management Console.