Runbooks
After this you can answer: What is a runbook, and what do the first five minutes of an incident look like?
Picture it
Section titled “Picture it”flowchart TB A["alarm email or a user report"] --> I["1. is a customer affected?<br/>dashboard"] I --> L["2. what fails?<br/>errors query, correlation id"] L --> C["3. what changed?<br/>last CD run, ECS events"] C --> D{"4. decide"} D --> F["fix forward"] D --> R["roll back (image_tag)"] D --> W["contain and wait<br/>(messages stay queued)"]How it works
Section titled “How it works”- Minute 1: read the alarm. Its name says what is wrong; its description says where to look first. Note the time.
- Minute 2: is a customer affected? The dashboard’s alarm box and the graph for that part. A DLQ message is one customer without an email; ALB 5xx is many visitors with errors.
- Minute 3: what fails? Logs Insights, saved query
minitickets-dev/errors. Take onecorrelationIdand runfollow-one-request. - Minute 4: what changed? The last CD run in GitHub Actions, and the ECS service events. Most incidents follow a change.
- Minute 5: decide. Fix forward if the cause is clear and small. Roll back the app if the last deploy caused it. Or contain: queued messages wait up to 4 days, so an email problem can wait for a proper fix.
In MiniTickets
Section titled “In MiniTickets”| Situation | Runbook |
|---|---|
jobs-dlq-not-empty | DLQ has messages |
jobs-oldest-message-age | Jobs queue is stuck |
worker-errors | Worker crashes or times out |
alb-5xx | Visitors get 5xx |
| A bad deploy | Roll back the app |
| CD refused or stopped | Deploy guard refused, Migration failed |
Each runbook has the same four parts: Signal, Check (read-only first), Fix, Verify. Write actions are described as console clicks or CD runs, never as commands to paste: a pasted write command in a hurry is how incidents grow.
Play the failing email: it ends with this checklist →See it in AWS
Section titled “See it in AWS”CloudWatch → Dashboards → minitickets-dev, then Logs Insights → Saved queries.
aws cloudwatch describe-alarms --state-value ALARM --alarm-name-prefix minitickets-dev-
Each alarm’s description, with where to look:
infra/src/observability/alarm-specs.ts → alarmSpecs.
Break it
Section titled “Break it”| Symptom | Cause | Where to look |
|---|---|---|
| Nobody noticed an incident for hours | The alert subscription was never confirmed | SNS → alerts topic → Subscriptions |
| A “fix” made things worse | A write command run in a hurry, against the wrong thing | CloudTrail event history |
| Two people fix the same thing at once | Nobody said “I have it” | The incident channel |
Say it in an interview
Section titled “Say it in an interview”Follow-ups
Section titled “Follow-ups”Why read-only checks first?
They cannot make things worse, and they often show that the cause is somewhere else than it seemed. Writes come after the cause is known.
When do you roll back instead of fixing forward?
When the last deploy clearly caused it and the old version is compatible with the current schema. A rollback is a known state; a quick fix is a new, untested one.
What happens after the incident?
A short write-up without blame: what happened, why, and one check, alarm, test or rule that stops it next time. Then update the runbook.
Advanced: Details: who did what
CloudTrail’s event history (90 days, free) shows every AWS API call with the role and session name. CD sessions are named after the GitHub run id, so a change can be traced to one run.
Checkpoint
Section titled “Checkpoint”Answer these without scrolling up. If one feels hard, reread that section.
- What are the four parts of every runbook?
- What do you do in each of the first five minutes?
- Which saved query do you run first?
- When is “contain and wait” a good choice?
- Why are write actions never written as commands to paste?
Redraw it from memory: alarm → customer affected? (dashboard) → what fails? (errors query, correlation id) → what changed? (CD run, ECS events) → fix forward / roll back / contain
Try this: on the map, play the failing-email flow to the end and name the runbook the last step needs
Read this book online: https://book.theversehub.in/