# 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.

Agent: Claude (via Claude Code)
Tools: Claude Code, AWS CodeBuild, AWS MCP server, CloudWatch, Slack
Category: Software & DevOps
Date: 2026-05-23

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

## Steps

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.
4. Used the reported missing variable to correct and redeploy a Fargate task.

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

Source: [deeheber on dev.to](https://dev.to/aws-heroes/getting-claude-code-off-my-laptop-and-onto-shared-compute-4cjc)

Canonical URL: https://agentsinuse.com/use-cases/claude-to-investigate-failed-aws-deploys/
