> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo Remediation Runbook

> Guide to using AWS Systems Manager Automation runbook to start stopped EC2 instances.

This walkthrough shows how to use AWS Systems Manager Automation runbooks to remediate an operational issue: starting an EC2 instance that is in the stopped state. Systems Manager Automation runbooks let you define a sequence of ordered, reusable steps to perform operational actions on AWS resources—removing the need for manual console clicks and producing auditable, repeatable remediation.

Use case keywords: Systems Manager Automation, Automation runbook, `AWS-StartEC2Instance`, EC2 remediation, SSM agent.

Before you begin

* Confirm the target EC2 instance is in the `stopped` state.
* Verify the instance is a managed instance (SSM Agent installed).
* Ensure the instance has an instance profile with the `AmazonSSMManagedInstanceCore` policy or equivalent permissions.
* Make sure your user has permissions to execute Automation runbooks and to start EC2 instances. Automation may prompt you to select or create an Automation execution role when running the document.

Prerequisites: ensure the target EC2 instance is a managed instance (SSM Agent installed) and has an instance profile with `AmazonSSMManagedInstanceCore` (see AWS setup guidance: [https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html)). Also confirm your user has permissions to use Systems Manager Automation and to start EC2 instances. If Automation requires an execution role, you can select or create one when executing the runbook.

How the remediation works (high level)

1. Locate the AWS-provided Automation document named `AWS-StartEC2Instance`.
2. Execute the document and provide the target EC2 instance ID(s) as input.
3. The runbook performs an `aws:changeInstanceState` action (start) and may run follow-up verification steps such as status checks.
4. Review the Automation execution details and verify the instance status in the EC2 console.

Step-by-step: execute the `AWS-StartEC2Instance` runbook

1. Open the Systems Manager console and navigate to Change Management Tools → Automation. Click “Execute Runbook” and use the document filter to find the AWS-managed document named `AWS-StartEC2Instance`. Select it to view the document details and execute it.

![Screenshot of the AWS Systems Manager console showing the "AWS-StartEC2Instance" document page with the Description tab selected and buttons for Delete, Actions, and an orange "Execute automation" button. The page shows the document version and brief description details like platform and target type.](https://mintcdn.com/kodekloud-c4ac6d9a/NJ9FmMaxSEmD0TY-/images/AWS-Certified-DevOps-Engineer-Professional/Domain-5-Incident-and-Event-Response/Demo-Remediation-Runbook/aws-ssm-start-ec2-instance-description.jpg?fit=max\&auto=format\&n=NJ9FmMaxSEmD0TY-\&q=85\&s=b22684298b1de45efc5fba30fd13b517)

2. Click “Execute automation.” When prompted for inputs, the most important field is the target instance(s). You can select “All EC2 instances” and then choose the specific instance(s) from the list, or supply one or more instance IDs directly. Confirm you’ve selected the correct instance(s) to remediate.

![A screenshot of the AWS Systems Manager Automation Execute page showing a selected EC2 instance named "WebServerA" (i-0d96cc656ab9a987c), type t3.micro, shown as stopped in availability zone us-east-2a. The page also displays automation role options and standard AWS console navigation.](https://mintcdn.com/kodekloud-c4ac6d9a/NJ9FmMaxSEmD0TY-/images/AWS-Certified-DevOps-Engineer-Professional/Domain-5-Incident-and-Event-Response/Demo-Remediation-Runbook/aws-ssm-automation-webservera-t3-micro-stopped.jpg?fit=max\&auto=format\&n=NJ9FmMaxSEmD0TY-\&q=85\&s=8c8663247b507c7e4c0278a9dafb38b6)

3. Start the execution. The runbook runs the `aws:changeInstanceState` action (for example, the `startInstances` step) to change the EC2 instance state to `running`. The EC2 console may show the instance as `running` before Automation finishes because the state change itself is immediate; Automation will continue any verification or follow-up steps until the runbook completes.

4. Monitor the execution on the Automation execution page. You’ll see step-level details such as step name (e.g., `startInstances`), action (`aws:changeInstanceState`), and individual step statuses. Wait for the overall execution status to show `Success`.

![A screenshot of the AWS Systems Manager Automation execution page showing details for an execution (Execution ID visible). It lists executed steps including a startInstances step (aws:changeInstanceState) marked Success.](https://mintcdn.com/kodekloud-c4ac6d9a/NJ9FmMaxSEmD0TY-/images/AWS-Certified-DevOps-Engineer-Professional/Domain-5-Incident-and-Event-Response/Demo-Remediation-Runbook/aws-ssm-automation-execution-startinstances-success.jpg?fit=max\&auto=format\&n=NJ9FmMaxSEmD0TY-\&q=85\&s=ef9fdc2a180e7e894ff4c49ddbabaa1c)

5. After the runbook succeeds, verify the instance status and health checks in the EC2 console. The Automation execution serves as an auditable record of the remediation and can be reviewed or re-run as needed.

![A screenshot of the AWS EC2 console Instances page showing one running instance named "WebServer" (t3.micro) with its instance ID and status, plus controls like Launch instances, Instance state, and Actions.](https://mintcdn.com/kodekloud-c4ac6d9a/NJ9FmMaxSEmD0TY-/images/AWS-Certified-DevOps-Engineer-Professional/Domain-5-Incident-and-Event-Response/Demo-Remediation-Runbook/aws-ec2-webserver-t3-micro-instance.jpg?fit=max\&auto=format\&n=NJ9FmMaxSEmD0TY-\&q=85\&s=3e1ed02b8640be4a650fcb2cda34a724)

Tips, automation patterns, and integrations

* Automate recurrent remediation by invoking Automation runbooks from EventBridge rules to trigger on specific CloudWatch alarms or events.
* Use Automation execution history for auditing and to diagnose recurring issues.
* If the runbook requires cross-account or elevated privileges, configure a dedicated Automation execution role with least-privilege permissions.
* Test runbooks in a non-production account or on test instances before applying them widely.

Quick reference table

| Topic | Details |
| - | - |
| Runbook name | `AWS-StartEC2Instance` |
| Key action | `aws:changeInstanceState` (start) |
| Target type | EC2 instance(s) — must be managed instances (SSM) |
| Common prerequisites | SSM Agent installed, instance profile with `AmazonSSMManagedInstanceCore`, user permissions to execute Automation and start instances |
| Integration options | EventBridge rules, Systems Manager Automation API, CloudWatch alarms |

Links and references

* [Systems Manager Automation documentation](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation.html)
* [Amazon EventBridge overview](https://docs.aws.amazon.com/eventbridge/latest/userguide/what-is-amazon-eventbridge.html)
* AWS setup guidance for SSM instance profile: [https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html)

That’s the basic remediation pattern: identify the affected resource, supply it as input to an Automation runbook, execute the runbook, and verify the result. Use these runbooks to build reliable, auditable remediation pipelines across your AWS environment.

> **[Watch Video](https://learn.kodekloud.com/user/courses/aws-certified-devops-engineer-professional/module/0054c8f3-16fd-4414-be5f-d43fc173b566/lesson/3fb147a4-ccbb-4c9a-a132-577bf59197a2)**

> **[Practice Lab](https://learn.kodekloud.com/user/courses/aws-certified-devops-engineer-professional/module/0054c8f3-16fd-4414-be5f-d43fc173b566/lesson/29b51d05-99a6-402d-8121-e5a895d937ea)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.