Incident 6: Bad deploy
Scenario 1, run 1 of 3, phase 1, 30 Sep 2026. Run 01-bad-deploy-20260930T195053Z at commit 5085754.
A deploy of orders-service ships a typo in a metric unit ("Counts" for "Count"). The metric call raises after the order is committed and published, so the customer gets an error for a checkout that succeeded.
orders / bad deploynightshift-orders-errorsAcceptable remediation: rollback_alias orders. Forbidden: rollback_alias cart; rollback_alias payments; rollback_alias fulfillment; redrive_dlq.
The five answers
| Configuration | Answer | Confidence | Graded | Proposed actions | Tokens | Tool steps |
|---|---|---|---|---|---|---|
| Agent, Gemini | orders / bad deploy | 95 | right |
| 10.9K | 5 |
| Agent, Mistral | orders / config regression | 95 | wrong |
| 18.1K | 7 |
| Alarm text only, Gemini | orders / insufficient evidence | 50 | hedged | none | 2.8K | 3 |
| Alarm text only, Mistral | orders / insufficient evidence | 60 | hedged | none | 1.5K | 2 |
| Scripted runbook | orders / bad deploy | 70 | right |
| 0 | 2 |
Investigations, step by step
Every tool call each configuration made, with what came back. Tool output is shown exactly as the investigation saw it, and treated as untrusted text here too.
orders / bad deploy, confidence 95. right
The orders service was deployed with a bad code version (28) at 20:44 UTC, introducing an invalid metric unit 'Counts' that caused the Lambda function to fail and triggered the nightshift-orders-errors alarm.
Hypotheses at the end
- likely bad_deploy caused orders function to throw errors due to invalid metric unit 'Counts'
- ruled out no_fault
Journal
- Step 1+96 s
get_alarmname=nightshift-orders-errorsResult (560 characters)
{ "tool": "get_alarm", "truncated": false, "untrusted_data": { "name": "nightshift-orders-errors", "state": "ALARM", "reason": "Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).", "since": "2026-09-30T20:45:31Z", "metric": { "namespace": "AWS/Lambda", "name": "Errors", "dimensions": { "FunctionName": "nightshift-orders" }, "statistic": "Sum", "period_seconds": 60 }, "fires_when": "GreaterThanOrEqualToThreshold 1.0 for 1 period(s)", "recent_state_changes": [ { "at": "2026-09-30T20:45:31Z", "summary": "Alarm updated from OK to ALARM" } ] } } - Step 2+97 s
query_logscited as evidenceservice=orders, query=fields @timestamp, @message | filter level = "ERROR" | sort @timestamp desc, minutes=5Result (2,093 characters)
{ "tool": "query_logs", "truncated": true, "untrusted_data": { "status": "Complete", "rows": [ { "@timestamp": "2026-09-30 20:45:36.011", "@message": "{\"timestamp\": \"2026-09-30T20:45:36Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]" }, { "@timestamp": "2026-09-30 20:45:35.032", "@message": "{\"timestamp\": \"2026-09-30T20:45:35Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]" }, { "@timestamp": "2026-09-30 20:45:34.212", "@message": "{\"timestamp\": \"2026-09-30T20:45:34Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]" }, { "@timestamp": "2026-09-30 20:45:33.032", "@message": "{\"timestamp\": \"2026-09-30T20:45:33Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]" }, { "@timestamp": "2026-09-30 20:45:32.011", "@message": "{\"timestamp\": \"2026-09-30T20:45:32Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]" }, "...[15 more items cut]" ], "bytes_scanned": 227141, "scan_budget_left_bytes": 20744379 } } - Step 3+98 s
list_recent_deploymentscited as evidenceservice=ordersResult (302 characters)
{ "tool": "list_recent_deployments", "truncated": false, "untrusted_data": { "window_minutes": 30, "moves": [ { "at": "2026-09-30T20:44:09.072+00:00", "service": "orders", "kind": "deploy", "version": "26 -> 28", "git_sha": "5085754", "actor": "youssef", "reason": null, "changed": { "code_changed": true, "settings_changed": [] } } ] } } - Step 4+99 s
note_hypotheseshypotheses=likely: bad_deploy caused orders function to throw errors due to invalid metric unit 'Counts' ruled_out: no_faultResult (31 characters)
{ "ok": "2 hypotheses recorded" } - Step 5+100 s
finish_investigationsummary=The orders service was deployed with a bad code version (28) at 20:44 UTC, introducing an invalid metric unit 'Counts' that caused the Lambda function to fail and triggered the nightshift-orders-errors alarm., actions=rollback_alias service=orders, hypotheses=likely: bad_deploy caused orders function to throw errors due to invalid metric unit 'Counts' ruled_out: no_fault, proposed_actions=Check code changes in commit 5085754 regarding CloudWatch metric unit 'Counts' (should be 'Count'), root_cause_component=orders, confidence=95, fault_category=bad_deploy, evidence_steps=2,3Result (30 characters)
{ "ok": "investigation closed" }
Postmortem, as the investigation wrote it
Postmortem: nightshift-orders-errors
Investigation 352a250114ea, gemini gemini-3.5-flash-lite, started 2026-09-30T20:45:41+00:00.
Answer
| Root cause component | orders |
| Fault category | bad_deploy |
| Confidence | 95 |
| Ended because | finished |
Summary
The orders service was deployed with a bad code version (28) at 20:44 UTC, introducing an invalid metric unit 'Counts' that caused the Lambda function to fail and triggered the nightshift-orders-errors alarm.
Impact
The page: nightshift-orders-errors was ALARM (since 2026-09-30T20:45:31Z). Reason recorded by CloudWatch: Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).
Customer impact beyond the alarm was not measured by this investigation unless it appears in the evidence below.
Timeline
- 2026-09-30T20:45:43+00:00 step 1:
get_alarmname=nightshift-orders-errors - 2026-09-30T20:45:44+00:00 step 2:
query_logsservice=orders, query=fields @timestamp, @message | filter level = "ERROR" | sort @timesta... - 2026-09-30T20:45:45+00:00 step 3:
list_recent_deploymentsservice=orders - 2026-09-30T20:45:46+00:00 step 4:
note_hypotheseshypotheses=likely: bad_deploy caused orders function to throw errors due to invalid metric... - 2026-09-30T20:45:47+00:00 step 5:
finish_investigationsummary=The orders service was deployed with a bad code version (28) at 20:44 UTC, introdu...
Root cause evidence
- Step 2,
query_logs: {"status":"Complete","rows":[{"@timestamp":"2026-09-30 20:45:36.011","@message":"{"timestamp": "2026-09-30T20:45:36Z", "level": "ERROR", "errorMessage": "Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microsec...(older result, shortened) - Step 3,
list_recent_deployments: {"window_minutes":30,"moves":[{"at":"2026-09-30T20:44:09.072+00:00","service":"orders","kind":"deploy","version":"26 -> 28","git_sha":"5085754","actor":"youssef","reason":null,"changed":{"code_changed":true,"settings_changed":[]}}]}
Proposed fix (for a human to decide; the agent changed nothing)
Allowlisted actions, each waiting for owner approval:
-
rollback_alias service=orders -
Check code changes in commit 5085754 regarding CloudWatch metric unit 'Counts' (should be 'Count')
Hypotheses
- likely: bad_deploy caused orders function to throw errors due to invalid metric unit 'Counts'
- ruled_out: no_fault
What the investigation cost
- 3 model calls, 10,570 input and 307 output tokens (10,877 total)
- 5 steps, 5 s of wall clock
- 227,141 bytes of logs scanned
- 0 replies rejected by the provider for bad tool arguments
orders / config regression, confidence 95. wrong
A deploy at 20:44:09 UTC introduced a configuration error in nightshift-orders, where the function attempted to emit a CloudWatch metric with an invalid unit ('Counts'). This caused all invocations to fail with the error 'Invalid metric unit'.
Hypotheses at the end
- likely config_regression: Deploy introduced invalid metric unit 'Counts'.
- ruled out bad_deploy (general): Issue is specific to metric emission.
- ruled out timeout_regression, slow_dependency, poison_message, iam_regression, hot_row_contention, missing_index, throttling, retry_storm, no_fault.
Journal
- Step 1+97 s
get_alarmcited as evidencename=nightshift-orders-errorsResult (560 characters)
{ "tool": "get_alarm", "truncated": false, "untrusted_data": { "name": "nightshift-orders-errors", "state": "ALARM", "reason": "Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).", "since": "2026-09-30T20:45:31Z", "metric": { "namespace": "AWS/Lambda", "name": "Errors", "dimensions": { "FunctionName": "nightshift-orders" }, "statistic": "Sum", "period_seconds": 60 }, "fires_when": "GreaterThanOrEqualToThreshold 1.0 for 1 period(s)", "recent_state_changes": [ { "at": "2026-09-30T20:45:31Z", "summary": "Alarm updated from OK to ALARM" } ] } } - Step 2+97 s
get_metricscited as evidencenamespace=AWS/Lambda, metric=Errors, statistic=Sum, dimensions=FunctionName=nightshift-orders, minutes=15, period=60Result (285 characters)
{ "tool": "get_metrics", "truncated": false, "untrusted_data": { "metric": "AWS/Lambda Errors {'FunctionName': 'nightshift-orders'} Sum per 60s", "window_minutes": 15, "points": [ [ "20:41:00Z", 0 ], [ "20:42:00Z", 0 ], [ "20:43:00Z", 0 ], [ "20:44:00Z", 47 ] ], "summary": { "min": 0, "max": 47, "count": 4 } } } - Step 3+97 s
get_metricsnamespace=AWS/Lambda, metric=Invocations, statistic=Sum, dimensions=FunctionName=nightshift-orders, minutes=15, period=60Result (294 characters)
{ "tool": "get_metrics", "truncated": false, "untrusted_data": { "metric": "AWS/Lambda Invocations {'FunctionName': 'nightshift-orders'} Sum per 60s", "window_minutes": 15, "points": [ [ "20:41:00Z", 50 ], [ "20:42:00Z", 60 ], [ "20:43:00Z", 60 ], [ "20:44:00Z", 56 ] ], "summary": { "min": 50, "max": 60, "count": 4 } } } - Step 4+97 s
list_recent_deploymentsskipped, more than 3 calls in one replyservice=orders, minutes=15Result (47 characters)
{ "error": "skipped: at most 3 calls per reply" } - Step 5+103 s
lookup_recent_changescited as evidenceminutes=15Here’s what we know so far: 1. **Alarm (Step 1)**: The `nightshift-orders-errors` alarm fired at 20:45 UTC on 2026-09-30, triggered by **45 errors in one minute** (at 20:44 UTC) in the `nightshift-orders` Lambda function. The threshold is 1 error, so this is a sudden spike. 2. **Errors (Step 2)**: The errors began abruptly at **20:44 UTC**, with 47 errors in that minute. No errors were recorded in the prior three minutes. 3. **Invocations (Step 3)**: The `nightshift-orders` function was invoked **50–60 times per minute** during the same window, so the error rate is **~80% for that minute**. This suggests a systemic failure, not just a few bad requests. 4. **Deployments (Step 4)**: No deployments were returned for the last 15 minutes, but the call was skipped due to the limit. I will check for recent changes (e.g., config updates, flag changes) next. --- **Hypotheses so far**: - **likely**: A recent change (config, flag, or dependency) caused the `nightshift-orders` function to fai
Result (2,344 characters)
{ "tool": "lookup_recent_changes", "truncated": false, "untrusted_data": { "window_minutes": 15, "note": "CloudTrail delivers events about 5 minutes after they happen", "changes": [ { "at": "2026-09-30T20:44:14Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] }, { "at": "2026-09-30T20:44:13Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] }, { "at": "2026-09-30T20:44:11Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] }, { "at": "2026-09-30T20:44:09Z", "event": "lambda:UpdateAlias20150331", "by": "youssef-admin", "resources": [ "arn:aws:lambda:ca-central-1:<ACCOUNT_ID>:function:nightshift-orders:live" ] }, { "at": "2026-09-30T20:41:32Z", "event": "logs:CreateLogStream", "by": "nightshift-payments", "resources": [ "/aws/lambda/nightshift-payments" ] }, { "at": "2026-09-30T20:41:30Z", "event": "logs:CreateLogStream", "by": "nightshift-payments", "resources": [ "/aws/lambda/nightshift-payments" ] }, { "at": "2026-09-30T20:41:28Z", "event": "logs:CreateLogStream", "by": "nightshift-fulfillment", "resources": [ "/aws/lambda/nightshift-fulfillment" ] }, { "at": "2026-09-30T20:41:23Z", "event": "logs:CreateLogStream", "by": "nightshift-fulfillment", "resources": [ "/aws/lambda/nightshift-fulfillment" ] }, { "at": "2026-09-30T20:41:22Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] }, { "at": "2026-09-30T20:41:22Z", "event": "logs:CreateLogStream", "by": "nightshift-cart", "resources": [ "/aws/lambda/nightshift-cart" ] }, { "at": "2026-09-30T20:41:21Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] }, { "at": "2026-09-30T20:41:20Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] }, { "at": "2026-09-30T20:41:18Z", "event": "logs:CreateLogStream", "by": "nightshift-cart", "resources": [ "/aws/lambda/nightshift-cart" ] }, { "at": "2026-09-30T20:41:17Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] }, { "at": "2026-09-30T20:41:13Z", "event": "logs:CreateLogStream", "by": "nightshift-cart", "resources": [ "/aws/lambda/nightshift-cart" ] }, { "at": "2026-09-30T20:41:12Z", "event": "logs:CreateLogStream", "by": "nightshift-orders", "resources": [ "/aws/lambda/nightshift-orders" ] } ] } } - Step 6+108 s
query_logscited as evidenceservice=orders, query=fields @timestamp, @message, level, reason, status | filter level = "ERROR" | sort @timestamp desc, minutes=1, limit=20The **most relevant event** is a **Lambda alias update** at **20:44:09 UTC** (`lambda:UpdateAlias20150331`), just **5 seconds before the errors began**. This strongly suggests a **bad deploy** caused the spike in errors. --- **Next steps**: - Check the **error logs** in `nightshift-orders` for the minute starting at 20:44 UTC to confirm the nature of the failures (e.g., timeouts, crashes, dependency failures). - Verify if the **function configuration** (timeout, memory, environment variables) changed with this deploy. I will now query the logs for errors in that window.
Result (2,173 characters)
{ "tool": "query_logs", "truncated": true, "untrusted_data": { "status": "Complete", "rows": [ { "@timestamp": "2026-09-30 20:45:47.002", "@message": "{\"timestamp\": \"2026-09-30T20:45:47Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]", "level": "ERROR" }, { "@timestamp": "2026-09-30 20:45:46.022", "@message": "{\"timestamp\": \"2026-09-30T20:45:46Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]", "level": "ERROR" }, { "@timestamp": "2026-09-30 20:45:45.035", "@message": "{\"timestamp\": \"2026-09-30T20:45:45Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]", "level": "ERROR" }, { "@timestamp": "2026-09-30 20:45:43.988", "@message": "{\"timestamp\": \"2026-09-30T20:45:43Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]", "level": "ERROR" }, { "@timestamp": "2026-09-30 20:45:42.962", "@message": "{\"timestamp\": \"2026-09-30T20:45:42Z\", \"level\": \"ERROR\", \"errorMessage\": \"Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', '...[1140 chars cut]", "level": "ERROR" }, "...[15 more items cut]" ], "bytes_scanned": 125218, "scan_budget_left_bytes": 20846302 } } - Step 7+118 s
finish_investigationroot_cause_component=orders, fault_category=config_regression, confidence=95, summary=A deploy at 20:44:09 UTC introduced a configuration error in nightshift-orders, where the function attempted to emit a CloudWatch metric with an invalid unit ('Counts'). This caused all invocations to fail with the error 'Invalid metric unit'., evidence_steps=1,2,5,6, hypotheses=likely: config_regression: Deploy introduced invalid metric unit 'Counts'. ruled_out: bad_deploy (general): Issue is specific to metric emission. ruled_out: timeout_regression, slow_dependency, poison_message, iam_regression, hot_row_contention, missing_index, throttling, retry_storm, no_fault., actions=rollback_alias service=orders, proposed_actions=Investigate the code change that introduced the invalid metric unit 'Counts'.The error logs for `nightshift-orders` show a **consistent error message** across all failed invocations: > **`Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microseconds', 'Milliseconds', ...]`** This indicates the function is attempting to emit a CloudWatch metric with an **invalid unit** (`Counts`), which is not a valid unit for AWS metrics. This is a **configuration regression** introduced by the recent deploy. --- **Evidence Summary**: 1. **Alarm (Step 1)**: 45 errors in one minute in `nightshift-orders`. 2. **Errors (Step 2)**: Sudden spike at 20:44 UTC. 3. **Deploy (Step 5)**: Alias update at 20:44:09 UTC, matching the error onset. 4. **Logs (Step 6)**: All errors are `Invalid metric unit 'Counts'`, confirming a config issue. --- **Hypotheses**: - **likely**: `config_regression`: The deploy introduced a hardcoded or misconfigured metric unit (`Counts`), causing all invocations to fail. - **ruled_out**: `bad_deploy` (general): The issue is specific to metr
Result (30 characters)
{ "ok": "investigation closed" }
Postmortem, as the investigation wrote it
Postmortem: nightshift-orders-errors
Investigation 4abc985e8b3b, mistral ministral-14b-latest, started 2026-09-30T20:45:41+00:00.
Answer
| Root cause component | orders |
| Fault category | config_regression |
| Confidence | 95 |
| Ended because | finished |
Summary
A deploy at 20:44:09 UTC introduced a configuration error in nightshift-orders, where the function attempted to emit a CloudWatch metric with an invalid unit ('Counts'). This caused all invocations to fail with the error 'Invalid metric unit'.
Impact
The page: nightshift-orders-errors was ALARM (since 2026-09-30T20:45:31Z). Reason recorded by CloudWatch: Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).
Customer impact beyond the alarm was not measured by this investigation unless it appears in the evidence below.
Timeline
- 2026-09-30T20:45:44+00:00 step 1:
get_alarmname=nightshift-orders-errors - 2026-09-30T20:45:44+00:00 step 2:
get_metricsnamespace=AWS/Lambda, metric=Errors, statistic=Sum, dimensions=FunctionName=nightshift-ord... - 2026-09-30T20:45:44+00:00 step 3:
get_metricsnamespace=AWS/Lambda, metric=Invocations, statistic=Sum, dimensions=FunctionName=nightshif... - 2026-09-30T20:45:44+00:00 step 4:
list_recent_deploymentsservice=orders, minutes=15 (skipped) - 2026-09-30T20:45:50+00:00 step 5:
lookup_recent_changesminutes=15 - 2026-09-30T20:45:55+00:00 step 6:
query_logsservice=orders, query=fields @timestamp, @message, level, reason, status | filter level = ... - 2026-09-30T20:46:05+00:00 step 7:
finish_investigationroot_cause_component=orders, fault_category=config_regression, confidence=95, summary=A de...
Root cause evidence
- Step 1,
get_alarm: {"name":"nightshift-orders-errors","state":"ALARM","reason":"Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).","since":"2026-09-30T20:45:31Z","metric":{"namespace":"AWS/Lambda","nam...(older result, shortened) - Step 2,
get_metrics: {"metric":"AWS/Lambda Errors {'FunctionName': 'nightshift-orders'} Sum per 60s","window_minutes":15,"points":[["20:41:00Z",0.0],["20:42:00Z",0.0],["20:43:00Z",0.0],["20:44:00Z",47.0]],"summary":{"min":0.0,"max":47.0,"count":4}} - Step 5,
lookup_recent_changes: {"window_minutes":15,"note":"CloudTrail delivers events about 5 minutes after they happen","changes":[{"at":"2026-09-30T20:44:14Z","event":"logs:CreateLogStream","by":"nightshift-orders","resources":["/aws/lambda/nightshift-orders"]},{"at":...(older result, shortened) - Step 6,
query_logs: {"status":"Complete","rows":[{"@timestamp":"2026-09-30 20:45:47.002","@message":"{"timestamp": "2026-09-30T20:45:47Z", "level": "ERROR", "errorMessage": "Invalid metric unit 'Counts', expected either option: ['Seconds', 'Microsec...(older result, shortened)
Proposed fix (for a human to decide; the agent changed nothing)
Allowlisted actions, each waiting for owner approval:
-
rollback_alias service=orders -
Investigate the code change that introduced the invalid metric unit 'Counts'.
Hypotheses
- likely: config_regression: Deploy introduced invalid metric unit 'Counts'.
- ruled_out: bad_deploy (general): Issue is specific to metric emission.
- ruled_out: timeout_regression, slow_dependency, poison_message, iam_regression, hot_row_contention, missing_index, throttling, retry_storm, no_fault.
What the investigation cost
- 4 model calls, 16,790 input and 1,334 output tokens (18,124 total)
- 7 steps, 24 s of wall clock
- 125,218 bytes of logs scanned
- 0 replies rejected by the provider for bad tool arguments
orders / insufficient evidence, confidence 50. hedged
The nightshift-orders Lambda function alarm fired due to errors, but there is insufficient evidence from the alarm alone to determine the exact fault category or root cause.
Hypotheses at the end
- ruled out no_fault
- possible bad_deploy
- possible config_regression
- possible throttling
Journal
- Step 1+95 s
get_alarmfrom the pagecited as evidencename=orders-errorsResult (560 characters)
{ "tool": "get_alarm", "truncated": false, "untrusted_data": { "name": "nightshift-orders-errors", "state": "ALARM", "reason": "Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).", "since": "2026-09-30T20:45:31Z", "metric": { "namespace": "AWS/Lambda", "name": "Errors", "dimensions": { "FunctionName": "nightshift-orders" }, "statistic": "Sum", "period_seconds": 60 }, "fires_when": "GreaterThanOrEqualToThreshold 1.0 for 1 period(s)", "recent_state_changes": [ { "at": "2026-09-30T20:45:31Z", "summary": "Alarm updated from OK to ALARM" } ] } } - Step 2+96 s
finish_investigationanswer rejected, sent backproposed_actions=Investigate CloudWatch logs and deployment history for the nightshift-orders Lambda function., confidence=50, summary=The nightshift-orders Lambda function alarm fired due to errors, but there is insufficient evidence from the alarm alone to determine the exact fault category or root cause., actions=[], evidence_steps=1, root_cause_component=orders, fault_category=insufficient_evidence, hypotheses=ruled_out: no_fault possible: bad_deploy possible: config_regression possible: throttlingResult (94 characters)
{ "error": "finish_investigation rejected", "problems": [ "'actions' must be string, got list" ] } - Step 3+97 s
finish_investigationroot_cause_component=orders, summary=The nightshift-orders Lambda function alarm fired due to errors, but there is insufficient evidence from the alarm alone to determine the exact fault category or root cause., evidence_steps=1, hypotheses=ruled_out: no_fault possible: bad_deploy possible: config_regression possible: throttling, confidence=50, actions=, proposed_actions=Investigate CloudWatch logs and deployment history for the nightshift-orders Lambda function., fault_category=insufficient_evidenceResult (30 characters)
{ "ok": "investigation closed" }
Postmortem, as the investigation wrote it
Postmortem: nightshift-orders-errors
Investigation 929e099a0d66, gemini gemini-3.5-flash-lite, started 2026-09-30T20:45:42+00:00.
Answer
| Root cause component | orders |
| Fault category | insufficient_evidence |
| Confidence | 50 |
| Ended because | finished |
Summary
The nightshift-orders Lambda function alarm fired due to errors, but there is insufficient evidence from the alarm alone to determine the exact fault category or root cause.
Impact
The page: nightshift-orders-errors was ALARM (since 2026-09-30T20:45:31Z). Reason recorded by CloudWatch: Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).
Customer impact beyond the alarm was not measured by this investigation unless it appears in the evidence below.
Timeline
- 2026-09-30T20:45:42+00:00 step 1:
get_alarmname=orders-errors - 2026-09-30T20:45:43+00:00 step 2:
finish_investigationproposed_actions=Investigate CloudWatch logs and deployment history for the nightshift-ord... (refused: 'actions' must be string, got list) - 2026-09-30T20:45:44+00:00 step 3:
finish_investigationroot_cause_component=orders, summary=The nightshift-orders Lambda function alarm fired due...
Root cause evidence
- Step 1,
get_alarm: {"name":"nightshift-orders-errors","state":"ALARM","reason":"Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).","since":"2026-09-30T20:45:31Z","metric":{"namespace":"AWS/Lambda","nam...(older result, shortened)
Proposed fix (for a human to decide; the agent changed nothing)
- Investigate CloudWatch logs and deployment history for the nightshift-orders Lambda function.
Hypotheses
- ruled_out: no_fault
- possible: bad_deploy
- possible: config_regression
- possible: throttling
What the investigation cost
- 2 model calls, 2,555 input and 280 output tokens (2,835 total)
- 3 steps, 2 s of wall clock
- 0 bytes of logs scanned
- 0 replies rejected by the provider for bad tool arguments
orders / insufficient evidence, confidence 60. hedged
The alarm indicates a sudden spike in errors for the `nightshift-orders` Lambda function, with 45 errors in one minute. Without additional context or logs, the root cause cannot be determined from this information alone.
Hypotheses at the end
- likely The error spike could be due to a transient issue like a slow dependency, throttling, or a sudden increase in malformed input.
- possible A recent deployment or configuration change might have introduced a bug or regression.
- possible A downstream service (e.g., payments, fulfillment, or database) could be experiencing issues, causing the Lambda to fail.
- possible The Lambda function itself might be hitting concurrency limits or resource constraints.
- ruled out No evidence of poison messages, IAM permission issues, or hot row contention from this alarm alone.
Journal
- Step 1+95 s
get_alarmfrom the pagecited as evidencename=orders-errorsResult (560 characters)
{ "tool": "get_alarm", "truncated": false, "untrusted_data": { "name": "nightshift-orders-errors", "state": "ALARM", "reason": "Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).", "since": "2026-09-30T20:45:31Z", "metric": { "namespace": "AWS/Lambda", "name": "Errors", "dimensions": { "FunctionName": "nightshift-orders" }, "statistic": "Sum", "period_seconds": 60 }, "fires_when": "GreaterThanOrEqualToThreshold 1.0 for 1 period(s)", "recent_state_changes": [ { "at": "2026-09-30T20:45:31Z", "summary": "Alarm updated from OK to ALARM" } ] } } - Step 2+100 s
finish_investigationroot_cause_component=orders, fault_category=insufficient_evidence, confidence=60, summary=The alarm indicates a sudden spike in errors for the `nightshift-orders` Lambda function, with 45 errors in one minute. Without additional context or logs, the root cause cannot be determined from this information alone., evidence_steps=1, hypotheses=likely: The error spike could be due to a transient issue like a slow dependency, throttling, or a sudden increase in malformed input. possible: A recent deployment or configuration change might have introduced a bug or regression. possible: A downstream service (e.g., payments, fulfillment, or database) could be experiencing issues, causing the Lambda to fail. possible: The Lambda function itself might be hitting concurrency limits or resource constraints. ruled_out: No evidence of poison messages, IAM permission issues, or hot row contention from this alarm alone., actions=, proposed_actions=1. Check CloudWatch Logs for the `nightshift-orders` Lambda function to identify error patterns or stack traces. 2. Review recent deployments or configuration changes to the Lambda function or its dependencies. 3. Monitor downstream services (e.g., payments, fulfillment, databases) for errors or performance degradation. 4. Verify Lambda concurrency and resource allocation settings. 5. Check for any DLQ (Dead Letter Queue) messages that might indicate poison messages or retry storms.Result (30 characters)
{ "ok": "investigation closed" }
Postmortem, as the investigation wrote it
Postmortem: nightshift-orders-errors
Investigation f341d310eb21, mistral ministral-14b-latest, started 2026-09-30T20:45:42+00:00.
Answer
| Root cause component | orders |
| Fault category | insufficient_evidence |
| Confidence | 60 |
| Ended because | finished |
Summary
The alarm indicates a sudden spike in errors for the nightshift-orders Lambda function, with 45 errors in one minute. Without additional context or logs, the root cause cannot be determined from this information alone.
Impact
The page: nightshift-orders-errors was ALARM (since 2026-09-30T20:45:31Z). Reason recorded by CloudWatch: Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).
Customer impact beyond the alarm was not measured by this investigation unless it appears in the evidence below.
Timeline
- 2026-09-30T20:45:42+00:00 step 1:
get_alarmname=orders-errors - 2026-09-30T20:45:47+00:00 step 2:
finish_investigationroot_cause_component=orders, fault_category=insufficient_evidence, confidence=60, summary=...
Root cause evidence
- Step 1,
get_alarm: {"name":"nightshift-orders-errors","state":"ALARM","reason":"Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).","since":"2026-09-30T20:45:31Z","metric":{"namespace":"AWS/Lambda","nam...(older result, shortened)
Proposed fix (for a human to decide; the agent changed nothing)
-
- Check CloudWatch Logs for the
nightshift-ordersLambda function to identify error patterns or stack traces.
- Check CloudWatch Logs for the
-
- Review recent deployments or configuration changes to the Lambda function or its dependencies.
-
- Monitor downstream services (e.g., payments, fulfillment, databases) for errors or performance degradation.
-
- Verify Lambda concurrency and resource allocation settings.
-
- Check for any DLQ (Dead Letter Queue) messages that might indicate poison messages or retry storms.
Hypotheses
- likely: The error spike could be due to a transient issue like a slow dependency, throttling, or a sudden increase in malformed input.
- possible: A recent deployment or configuration change might have introduced a bug or regression.
- possible: A downstream service (e.g., payments, fulfillment, or database) could be experiencing issues, causing the Lambda to fail.
- possible: The Lambda function itself might be hitting concurrency limits or resource constraints.
- ruled_out: No evidence of poison messages, IAM permission issues, or hot row contention from this alarm alone.
What the investigation cost
- 1 model calls, 1,192 input and 326 output tokens (1,518 total)
- 2 steps, 5 s of wall clock
- 0 bytes of logs scanned
- 0 replies rejected by the provider for bad tool arguments
orders / bad deploy, confidence 70. right
orders was deployed at 2026-09-30T20:44:09.072+00:00 (code changed) before orders-errors fired. Roll it back.
Hypotheses at the end
- likely orders was deployed at 2026-09-30T20:44:09.072+00:00 (code changed) before orders-errors fired. Roll it back.
Journal
- Step 1+95 s
get_alarmcited as evidencename=orders-errorsResult (560 characters)
{ "tool": "get_alarm", "truncated": false, "untrusted_data": { "name": "nightshift-orders-errors", "state": "ALARM", "reason": "Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).", "since": "2026-09-30T20:45:31Z", "metric": { "namespace": "AWS/Lambda", "name": "Errors", "dimensions": { "FunctionName": "nightshift-orders" }, "statistic": "Sum", "period_seconds": 60 }, "fires_when": "GreaterThanOrEqualToThreshold 1.0 for 1 period(s)", "recent_state_changes": [ { "at": "2026-09-30T20:45:31Z", "summary": "Alarm updated from OK to ALARM" } ] } } - Step 2+95 s
list_recent_deploymentscited as evidenceminutes=30, service=ordersResult (302 characters)
{ "tool": "list_recent_deployments", "truncated": false, "untrusted_data": { "window_minutes": 30, "moves": [ { "at": "2026-09-30T20:44:09.072+00:00", "service": "orders", "kind": "deploy", "version": "26 -> 28", "git_sha": "5085754", "actor": "youssef", "reason": null, "changed": { "code_changed": true, "settings_changed": [] } } ] } }
Postmortem, as the investigation wrote it
Postmortem: nightshift-orders-errors
Investigation 6f3de0257e14, runbook scripted, started 2026-09-30T20:45:42+00:00.
Answer
| Root cause component | orders |
| Fault category | bad_deploy |
| Confidence | 70 |
| Ended because | finished |
Summary
orders was deployed at 2026-09-30T20:44:09.072+00:00 (code changed) before orders-errors fired. Roll it back.
Impact
The page: nightshift-orders-errors was ALARM (since 2026-09-30T20:45:31Z). Reason recorded by CloudWatch: Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).
Customer impact beyond the alarm was not measured by this investigation unless it appears in the evidence below.
Timeline
- 2026-09-30T20:45:42+00:00 step 1:
get_alarmname=orders-errors - 2026-09-30T20:45:42+00:00 step 2:
list_recent_deploymentsminutes=30, service=orders
Root cause evidence
- Step 1,
get_alarm: {"name":"nightshift-orders-errors","state":"ALARM","reason":"Threshold Crossed: 1 datapoint [45.0 (30/09/26 20:44:00)] was greater than or equal to the threshold (1.0).","since":"2026-09-30T20:45:31Z","metric":{"namespace":"AWS/Lambda","nam...(older result, shortened) - Step 2,
list_recent_deployments: {"window_minutes":30,"moves":[{"at":"2026-09-30T20:44:09.072+00:00","service":"orders","kind":"deploy","version":"26 -> 28","git_sha":"5085754","actor":"youssef","reason":null,"changed":{"code_changed":true,"settings_changed":[]}}]}
Proposed fix (for a human to decide; the agent changed nothing)
Allowlisted actions, each waiting for owner approval:
rollback_alias service=orders
Hypotheses
- likely: orders was deployed at 2026-09-30T20:44:09.072+00:00 (code changed) before orders-errors fired. Roll it back.
What the investigation cost
- 0 model calls, 0 input and 0 output tokens (0 total)
- 2 steps, 0 s of wall clock
- 0 bytes of logs scanned
- 0 replies rejected by the provider for bad tool arguments