Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

AWS-PatchInstanceWithRollback - AWS Systems Manager Automation runbook reference

AWS-PatchInstanceWithRollback

Description

Brings an EC2 instance into compliance with the applicable patch baseline. Rolls back root volume on failure.

Run this Automation (console)

Document type

Automation

Owner

Amazon

Platforms

Linux, macOS, Windows

Parameters

  • AutomationAssumeRole

    Type: String

    Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook.

  • InstanceId

    Type: String

    Description: (Required) EC2 InstanceId to which we apply the patch-baseline.

  • LambdaAssumeRole

    Type: String

    Description: (Optional) The ARN of the role that allows Lambda created by Automation to perform the actions on your behalf. If not specified a transient role will be created to run the Lambda function.

  • ReportS3Bucket

    Type: String

    Description: (Optional) Amazon S3 Bucket destination for the Compliance Report generated during process.

Document Steps

Step number Step name Automation action

1

createDocumentStack

aws:createStack

2

IdentifyRootVolume

aws:invokeLambdaFunction

3

PrePatchSnapshot

aws:executeAutomation

4

installMissingUpdates

aws:runCommand

5

SleepThruInstallation

aws:invokeLambdaFunction

6

CheckCompliance

aws:invokeLambdaFunction

7

SaveComplianceReportToS3

aws:invokeLambdaFunction

8

ReportSuccessOrFailure

aws:invokeLambdaFunction

9

RestoreFromSnapshot

aws:invokeLambdaFunction

10 DeleteSnapshot

aws:invokeLambdaFunction

11

deleteCloudFormationTemplate

aws:deleteStack

Outputs

IdentifyRootVolume.Payload

PrePatchSnapshot.Output

SaveComplianceReportToS3.Payload

RestoreFromSnapshot.Payload

CheckCompliance.Payload

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.