Skip to content
Agentmart
Submit a tool

k-aws-troubleshoot

Diagnose failing ALVS Fargate Django/Astro deploys: task stops, unhealthy targets, secret injection, Cloud Map SSR calls, RDS connectivity.

Skill by kodexArg

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/kodexarg-k-aws-troubleshoot

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Diagnose failing ALVS Fargate Django/Astro deploys: task stops, unhealthy targets, secret injection, Cloud Map SSR calls, RDS connectivity. Use when a service is down or deploy fails. Read-only first; us-east-1 profile kodex.

Use cases: backend, devops, cloud, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/k-aws-troubleshoot

What's inside

Skill name
k-aws-troubleshoot
Description
Diagnose failing ALVS Fargate Django/Astro deploys: task stops, unhealthy targets, secret injection, Cloud Map SSR calls, RDS connectivity. Use when a service is down or deploy fails. Read-only first; us-east-1 profile kodex.
License
MIT
Instructions
67 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

> [!info] In force on this repo (Team Party map)
> Layout [[adr-25-harness-layout]]: project stack skill (stem names the pinned stack taught).
> Product SSOT: `docs/constitution/PRD.md`. Canonical host: `{{PUBLIC_HOST}}`.
> Citations: [[adr-24-constitution]], [[adr-25-harness-layout]], [[adr-27-guardians-and-delivery]].
> Live AWS names that still contain `astro-drf-aws` are leftover until Gabriel reprovisions — do not invent ARNs.


# k-aws-troubleshoot

## Order of operations (always)

1. **Identity** — `aws sts get-caller-identity --profile kodex` (account must be `{{AWS_ACCOUNT_ID}}`).  
2. **Service** — running vs desired on `alvs-<env>`.  
3. **Events** — ECS service events (last failure reason).  
4. **Task** — stopped reason / essential container exit.  
5. **TG health** — ALB target health + reason.  
6. **Logs** — `k-aws-cloudwatch-query` on `/alvs/<project>/...`.  
7. **Config** — task def image tag, secrets, env, SG, subnets.

Do **not** jump to rewriting IAM or recreating clusters.

## Command pack

```bash
export AWS_PROFILE=kodex AWS_DEFAULT_REGION=us-east-1
CLUSTER=alvs-prod   # or alvs-dev
SVC=<project>-backend

aws ecs describe-services --cluster $CLUSTER --services $SVC \
  --query 'services[0].{status:status,desired:desiredCount,running:runningCount,events:events[:5],td:taskDefinition}'

aws ecs list-tasks --cluster $CLUSTER --service-name $SVC --desired-status STOPPED
aws ecs describe-tasks --cluster $CLUSTER --tasks <taskArn> \
  --query 'tasks[0].{stop:stoppedReason,containers:containers[*].{n:name,reason:reason,exit:exitCode}}'

aws elbv2 describe-target-health --target-group-arn <tg-arn>
```

## Failure map

| Symptom | Check |
|---------|--------|
| `CannotPullContainerError` | ECR repo/tag; exec role ECR perms; image never pushed |
| `ResourceInitializationError` + secrets | secret name/key; exec role `GetSecretValue` (`k-aws-secrets-manager`) |
| Task running, TG unhealthy | health path/port; security group ALB→task; app not listening 0.0.0.0 |
| Backend 5xx after deploy | logs Traceback; migrations not run; bad `DEBUG`/hosts |
| Frontend OK, API fail from browser | ALB path rules `/api/*` → backend TG; host header |
| Frontend SSR cannot call API | Cloud Map name `BACKEND_API_URL`; task SG; backend listening 8000 |
| DB connection errors | RDS SG allows task SG; secret host; `alvs-<env>-pg` status |
| OOM / exit 137 | Fargate memory too low; raise using valid pair (`k-aws-containers`) |

## Network expectations (do not “fix”)

- Tasks in **public** subnets with **public IP** — no NAT.  
- RDS in **isolated** subnets; only `alvs-<env>-task-sg` → 5432 on `alvs-<env>-rds-sg`.  
- SSR → backend via **Cloud Map**, not public ALB.

## Health paths

- Prefer template `GET /api/health/` for backend (declare in API.md).  
- Live sroa TGs may show `/health/` — when debugging sroa, use the live path; when building new projects, use API.md.

## Related

`k-aws-containers` · `k-aws-cloudwatch-query` · `k-aws-secrets-manager` · `k-aws-iam`

From kodexArg/astro-drf-aws, MIT.

More from kodexArg/astro-drf-aws

Signals

Stars
0
Forks
0
Open issues
4
Last commit (this folder)
Sep 14, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from kodexArg

Cite this page

k-aws-troubleshoot skill. Agent Mart. https://agentmart.dev/skills/kodexarg-k-aws-troubleshoot (last updated 2026-10-24)