On this page

A runbook template is a fixed outline for writing down how to do one operational task, so that the person on call can follow it without asking anyone. This guide gives you the template, a filled-in runbook example for a failed deploy, and a routine that keeps runbooks true as the system changes.

A runbook earns its place at the moment only one person knows how to do something. If that describes your releases or your outages, our DevOps consulting services cover the setup around it: a pipeline with a one-step rollback, alerts tied to what customers feel, and an on-call rota with runbooks sized for a small team.

What is a runbook?

A runbook is a written procedure for one task or one alert: what triggers it, the steps in order, how to confirm it worked and who to call if it did not. AWS's Well-Architected guidance defines it as "a documented process to achieve a specific outcome" and adds that, at its simplest, a runbook is a checklist to complete a task.

The point is the same result whoever does the work. AWS lists the benefits as fewer errors in manual tasks, operations performed in a consistent manner and new team members who can start performing tasks sooner.

Written procedures also shorten outages. Google's Site Reliability Engineering book reports that thinking through and recording best practices ahead of time in a playbook produces roughly a 3x improvement in mean time to repair (MTTR), compared with "winging it". Google calls these documents playbooks, and the next section covers the difference.

Runbook vs playbook: what is the difference?

A runbook says how to carry out a known procedure, and a playbook says how to investigate a problem whose cause is not yet known. In AWS's wording, playbooks are step-by-step guides used to investigate an incident, and in many cases they identify the root cause that a runbook is used to mitigate.

QuestionRunbookPlaybook
PurposeCarry out a known procedureInvestigate an incident
Starts fromA task or a known causeA symptom or an alert
ShapeOrdered steps with a checkQuestions, checks and branches
ExampleRoll back a failed deployFind why checkout errors rose

The names are not used the same way everywhere. Google's SRE workbook uses playbook for the entry behind each alert: it explains the severity and impact of the alert and includes debugging suggestions and possible actions. Pick one meaning for your team and write it at the top of the folder.

One more meaning is worth knowing. In cloud automation tools, a runbook is a script the platform runs for you. AWS Systems Manager Automation and Azure Automation both use the word that way. A written runbook is often the first draft of an automated one.

The runbook template: what goes in each section

The runbook template has three parts: a header that says when and by whom the runbook is used, the steps, and the checks that follow them. AWS publishes a minimal version with a title, an info table and numbered steps. The template below keeps those fields and adds the ones a small team misses most.

SectionWhat goes in itFailed deploy example
TitleThe task, as a verb phraseRoll back a failed deploy
TriggerThe alert or request that starts itError-rate alert after a release
OwnerThe person who keeps it currentA named engineer
Last testedThe date someone last ran itThe last practice run
Tools and accessWhat you need open, and permissionsPipeline and dashboard access
StepsOne action and its expected resultRun the rollback job
VerifyHow you know it workedError rate back under the alert line
Stop conditionWhen to stop and escalateRollback fails twice
EscalationWho to call, and howThe on-call lead
Who to tellThe people who need an updateSupport and the release author

The AWS template's info table holds a runbook ID, a description, the tools used, special permissions, the author, the date last updated and an escalation contact. Trigger, last tested, verify, stop condition and who to tell are our additions. They answer the questions an engineer asks at 3 a.m.: is this the right runbook, can I trust it, and am I done?

Runbook example: rolling back a failed deploy

This runbook example is for an invented web service with a deploy pipeline and an error-rate alert. It is written to be copied and changed, so replace every name with your own.

  • Title: Roll back a failed deploy.
  • Trigger: the error-rate alert fires within 30 minutes of a release.
  • Owner: the engineer who maintains the pipeline. Last tested: the date of the last practice run.
  • Tools and access: the pipeline, the error dashboard and permission to run the rollback job.
  1. Open the error dashboard, last 15 minutes. Expected result: the rise in errors starts after the release time.
  2. Post in the incident channel that a rollback is starting, with your name.
  3. Run the rollback job for the previous release. Expected result: the job finishes and the previous version is live.
  4. Watch the dashboard for 10 minutes. Expected result: error rate back under the alert line.
  5. Post that the rollback is done, and open a ticket for the failed release.
  • Stop condition: if the rollback job fails twice, or errors do not fall, stop and escalate.
  • Escalation: page the on-call lead.
  • Who to tell: support, and the author of the release.

Notice what the steps avoid. "Check the logs" is a hint, because it does not say which logs or what to look for. "Open the error dashboard, last 15 minutes" is a step. Each step holds one action, and each action has an expected result, so the reader knows whether to continue.

The time windows of 30, 15 and 10 minutes are examples. Set yours from how quickly your own alerts and dashboards react.

How to write a runbook in six steps

To write a runbook, pick one task, write the steps while you do it, and have someone else run it before you call it finished. AWS's guidance on how to create a runbook starts small on purpose. It suggests a process that is done semiregularly, is short in steps and has low-impact failures.

  1. Pick the task. Choose something done often enough to matter and safe enough to practise on.
  2. Fill in the header. Write the trigger, the owner, and the tools and access needed.
  3. Write the steps as you do the work. Record what you did, in order, with one action in each step.
  4. Add the expected result to every step, then the verify check, the stop condition and the escalation.
  5. Hand it to someone else. AWS's instruction is to give the runbook to a team member and have them use it to validate the steps. Fix whatever they had to ask about.
  6. Publish it where the team already looks, link it from the alert, and write the test date in the header.

Keep the wording plain. Write commands and screen names exactly as they appear, and keep explanations out of the steps. Background belongs in a short note under the header.

Which runbooks to write first

Write the first runbooks for the alerts that wake someone up and the tasks only one person can do. Google's SRE workbook describes the habit to aim for: whenever an alert is created, a matching entry is usually created with it. A small team can start with six.

  • Roll back a failed deploy. The example above.
  • Restore the database from a backup. Our disaster recovery plan template sets the targets that this runbook has to meet.
  • Respond to the main outage alert. The incident response plan template covers the roles and the communication around it.
  • Rotate a leaked secret.
  • Remove a person's access on their last day.
  • Hand over on-call at the end of a shift.

If you cannot tell which alerts matter, the alerts are the problem to fix first. Our guide to observability vs monitoring explains what a small team should watch.

Keeping runbooks current

A runbook stays useful only if someone owns it and someone has run it recently. Google's SRE workbook puts the problem in one line: details go out of date at the same rate as the production environment changes. AWS lists letting runbooks drift out of sync with system changes among its common anti-patterns.

Use this review checklist every quarter, and after any incident where a runbook was used:

  • Every runbook has a named owner who still works on that system.
  • The last tested date is recent, and the test was a real run, not a read-through.
  • Links to dashboards, jobs and channels still open.
  • Each alert links to its runbook, and each runbook names its alert.
  • Steps changed during the last incident have been written back in.

Automate what has become mechanical. Google's advice is direct: if a playbook is a deterministic list of commands that the on-call engineer runs every time an alert fires, implement automation. The written runbook then becomes the description of what the automation does, and the steps for when it fails.

How we set up runbooks and on-call

We start with the alerts. We set up logs, metrics and alerts tied to what customers feel, such as failed checkouts or slow pages, and then write the on-call rota and the runbooks for those alerts with your team. A rollback that anyone on the team can run comes first, because every release depends on it.

That work is part of our DevOps consulting. If an incident is running now and there is no runbook for it, our production incident response service steps in. Urgent requests are triaged the same day.

Every engagement is under an NDA, and the IP is always yours. It starts with a 20-minute call, and we quote after it.

Frequently asked questions

What should a runbook template include?

A runbook template should include a title, the trigger, an owner, the date it was last tested, the tools and access needed, numbered steps with an expected result for each, a verify check, a stop condition, an escalation contact and who to tell. Leave background out of the steps.

What is the difference between a runbook and a playbook?

A runbook is the procedure for a known task, such as rolling back a release. A playbook is a guide for investigating an incident whose cause is not yet known. AWS describes playbooks as finding the root cause that a runbook then mitigates. Naming varies: Google's SRE workbook uses "playbook" for the entry behind each alert.

Where can I find runbook examples?

This guide includes one complete runbook example, for rolling back a failed deploy. AWS publishes a minimal example runbook template in its Well-Architected guidance, with a title, an info table and numbered steps. Use both as a starting shape, then replace every name and step with your own.

How long should a runbook be?

Short enough to follow under pressure. One runbook covers one task or one alert. If a runbook needs branches for several different causes, split it into several runbooks and put the investigation into a playbook that points to each of them.

How do you create a runbook for a task nobody has documented?

Sit with the person who does the task and write each step as they perform it. Add the trigger, the expected result of each step and a stop condition. Then ask a different engineer to run it alone and fix every point where they had to ask a question.

Should runbooks be automated?

Automate a runbook once its steps are the same every time. Google's SRE workbook recommends automation when a playbook is a fixed list of commands run on every alert. Keep the written version: it documents what the automation does and gives the steps to follow when the automation fails.

Sources and update history