How do I use the AWSSupport-RestoreEC2InstanceFromSnapshot runbook to restore an Amazon EC2 instance from an Amazon EBS snapshot?

2 minute read
0

I want to use the AWS Systems Manager Automation AWSSupport-RestoreEC2InstanceFromSnapshot runbook to identify and restore an Amazon Elastic Compute Cloud (Amazon EC2) instance from an Amazon Elastic Block Store (Amazon EBS) root volume snapshot.

Resolution

Before you start the AWSSupport-RestoreEC2InstanceFromSnapshot runbook, make sure that your AWS Identify and Access Management (IAM) user or role has the required permissions. For more information, see the Required IAM permissions section of AWSSupport-RestoreEC2InstanceFromSnapshot.

Run the Systems Manager automation runbook

  1. Open the AWSSupport-RestoreEC2InstanceFromSnapshot runbook in the AWS Systems Manager console.
  2. Choose Execute automation.
  3. Enter the following values for the input parameters:
    InstanceId (required): The ID of the instance that you want to restore from a snapshot.
    SnapshotId (optional): The ID of the snapshot that you want to restore the instance from.
    InplaceSwap (required): Set this value to True so that the newly created volume replaces the existing root volume that's attached to your instance.
    StartDate (optional): The first date that you want the automation to look for a snapshot.
    EndDate (optional): The last date that you want the automation to look for a snapshot.
    LookForInstancetStatusCheck (optional): Set this parameter to True if you want the automation to check if instance status checks fail on the test instances that you launch from the snapshots.
    TotalSnapshotsToLook (optional): The number of snapshots that the automation reviews.
    SkipSnapshotsBy (optional): The interval at which snapshots are skipped when the runbook searches for snapshots to restore the instance. For example, if there are 100 available snapshots and the value of this parameter is 2, then the runbook reviews every third snapshot.
    AutomationAssumeRole (optional): The ARN of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions for you. If you don't specify a role, then Systems Manager Automation uses the permissions of the user that starts this runbook.
  4. Choose Execute.
    For a list of the steps that the runbook performs, see the Document steps section of AWSSupport-RestoreEC2InstanceFromSnapshot.

After the automation completes, review the Outputs section to see detailed results.

Related information

Run an automation

Setting up Automation

AWS OFFICIAL
AWS OFFICIALUpdated 7 months ago