Agents In Use
What’s new todayLast update
499 additions

How to use Claude to investigate failed AWS deploys

In the reported incident, the investigator flagged a missing Fargate environment variable; the developer added it and redeployed without asking the DevOps engineer.

TRY A BOUNDED VERSION

Prompt to try

Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.

Investigate failed CloudFormation stack [stack name] with optional suspected commit [commit]. Use [read-only AWS MCP role] to read stack state. Produce a short analysis with evidence and ranked hypotheses if unsure, then send it to [configured output destination].

What happened

In the reported incident, the investigator flagged a missing Fargate environment variable; the developer added it and redeployed without asking the DevOps engineer.

Reported by deeheber on dev.to

How the agent did it

  1. Built a CodeBuild project that ran Claude Code headlessly.
  2. Passed a failing stack name to inspect state through read-only AWS MCP.
  3. Generated a short analysis and posted it into the alert’s Slack thread.

Where a person stepped in

A developer read the diagnosis, added the missing environment variable, and redeployed. The source notes broad read-only IAM permissions.

A person set the goal and reviewed the result.

Danielle Heberling built cfn-investigator so teammates could get a starting point for failed CloudFormation deployments without waiting for the team's sole DevOps engineer. The tool ran Claude Code headlessly in AWS CodeBuild and accepted a failing stack name, optionally accompanied by a suspected commit.

Claude read stack state through an AWS MCP server using a read-only role, worked out likely causes, and wrote a short analysis. The system prompt allowed an unsure response with ranked hypotheses rather than forcing a definitive answer. A public example logged results to CloudWatch and provided a forwarding point; the author's workplace version posted into the Slack thread containing the deployment alert.

The author used CodeBuild and an Anthropic API key to reach a working prototype quickly. They acknowledged broad ReadOnlyAccess permissions, tools installed anew each run, and a role split that scoped MCP AWS calls rather than Claude itself.

In one reported incident, the investigator flagged a missing environment variable on a Fargate task definition. The developer read the message, added the variable, and redeployed without contacting anyone for help. The tool supplied diagnosis rather than repairing the deployment.

Who it's for: Teams wanting an automated first investigation of failed stacks while keeping deployment changes with developers.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: dev.to · deeheber

Frequently asked questions

Does the investigator repair deployments?

The author says it provides what broke and where to start. In the reported case, a developer added the missing variable and redeployed.

How does it handle uncertainty?

Its system prompt includes an unsure option that ranks hypotheses instead of inventing a clean answer.

More details

Remaining steps

  1. Used the reported missing variable to correct and redeploy a Fargate task.

About this account

Claude investigated stack state and produced analysis automatically; it did not fix the deployment.

Platform: dev.to. Attribution: https://dev.to/aws-heroes/getting-claude-code-off-my-laptop-and-onto-shared-compute-4cjc. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: deeheber on dev.to

Source published 23 May 2026

Source checked 14 Oct 2026

Tools and topics

Claude Code · AWS CodeBuild · AWS MCP server · CloudWatch · Slack

CloudFormation · Deployment diagnosis · Headless agents

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.