How can I use the "AWSSupport-TerminateIPMonitoringFromVPC" runbook to stop IP address monitoring?

2 minute read
0

I launched an Amazon Elastic Compute Cloud (Amazon EC2) instance to monitor IP addresses, and now I want to terminate the instance.

Short description

The AWSSupport-SetupIPMonitoringFromVPC runbook creates an Amazon EC2 instance in a specified subnet to monitor specified IP addresses (IPv4 or IPv6). This automation continuously runs ping, My Traceroute (MTR), traceroute and tracetcp tests. To end this monitoring test, use the AWSSupport-TerminateIPMonitoringFromVPC runbook to terminate the instance.

Resolution

Note: When you terminate your EC2 instance, all data that's related to the test is also deleted.

Prerequisites

Before you run the automation, make sure that your AWS Identity and Access Management (IAM) user or role has the necessary permissions. See the Required IAM permissions section in AWSSupport-TerminateIPMonitoringFromVPC.

Set up the automation workflow

  1. Open the AWS Systems Manager console.
  2. In the navigation pane, choose Documents.
  3. In the search bar, enter AWSSupport-TerminateIPMonitoringFromVPC.
  4. Choose AWSSupport-TerminateIPMonitoringFromVPC.
  5. Choose Execute automation.
  6. For the input parameters, enter the following information:
    (Optional) AutomationAssumeRole: Enter the ARN of the IAM role that allows Systems Manager Automation to perform actions for you. If you don't specify a role, then Systems Manager Automation uses the permissions of the user that starts this runbook.
    AutomationExecutionId: Enter the automation execution ID that you used to run the AWSSupport-SetupIPMonitoringFromVPC test. To find the execution ID, choose Automation from the navigation pane, and then search for the automation runbook.
    InstanceId: Enter the instance ID for the instance. You can use the Show interactive instance picker feature, or manually enter the instance ID.
    SubnetId: Enter the subnet ID for the instance.
  7. (Optional) Add an Amazon CloudWatch alarm to help you with your automation. If the alarm activates when the automation runs, then the automation stops.
  8. Choose Execute.

Related information

Run an automation

Setting up Automation

Systems Manager Automation runbook reference