amitkarpe/agent-skills/ecs-recovery
Claude Code and agent skill by amitkarpe/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Controlled ECS node recovery workflow for Docker and ECS restart, NAT verification, and optional drain operations on EC2-backed ECS clusters. Use when tasks are stuck, Docker NAT is suspect, or awslogs failures require node-by-node recovery with durable evidence.
Install
npx vskill@latest install amitkarpe/agent-skills/ecs-recoverySKILL.md
The same SKILL.md was published earlier as amitkarpe/agent-skills/ecs-recovery.
ECS Recovery
Use this skill for controlled recovery on EC2-backed ECS clusters.
Use when
- ECS tasks are stuck in
PENDINGorACTIVATING - Docker NAT or port-publish behavior is suspect
- Docker
awslogsis failing on specific nodes - Docker and ECS must be restarted on one node at a time
- you need durable evidence for before/after recovery state
Do not use when
- the cluster is already stable and you only need read-only monitoring
- the environment is Fargate-only
- you need broad parallel restart across many nodes
Use ecs-monitoring first for read-only watch and flap detection.
Recovery rules
- work on one node at a time
- prefer
DRAININGbefore restart when permissions allow it - if you do not have
ecs:UpdateContainerInstancesState, do not fake drain behavior - verify Docker NAT after restart
- stop if service counts worsen and do not recover promptly
- write evidence to a durable temp path outside chat context
Main scripts
Restart Docker and ECS on one node
This script:
- captures before state
- restarts
docker - waits briefly
- restarts
ecs - captures after state
- verifies:
docker=activeecs=active- Docker NAT chain exists
If output_dir is not provided, it writes to:
Resolve ECS container instance ARN from EC2 ID
Attempt to set a node to DRAINING
This script is useful only when the caller has:
ecs:UpdateContainerInstancesState
If the permission is missing, treat that as a real blocker and stop.
Recommended workflow
- Use
ecs-monitoringfirst to confirm which services and nodes are unstable. - Prefer drain over restart if permissions allow it.
- If drain is blocked, restart only one node at a time.
- After each restart, verify:
dockeractiveecsactive- Docker NAT chain present
- service counts stable or recovering
- Stop immediately if:
- a critical service stays degraded
- NAT chain does not return
- Docker or ECS does not come back
Evidence
Keep evidence outside the repo in:
Related skills
- use
ecs-monitoringbefore this skill for read-only diagnosis - later pair with
awslogs-investigationwhen the issue is logging-specific
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ecs-recovery/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amitkarpe/agent-skills/ecs-recovery)