awslogs-investigation

Diagnose Docker awslogs failures on EC2-backed ECS nodes via journal checks and node matrices.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/amitkarpe/agent-skills --skill awslogs-investigation-amitkarpe
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: awslogs-investigation
Source: https://github.com/amitkarpe/agent-skills/tree/main/skills/awslogs-investigation
Command: npx skills add https://github.com/amitkarpe/agent-skills --skill awslogs-investigation-amitkarpe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? When ECS tasks stop sending logs to CloudWatch, it is hard to tell whether the failure is cluster-wide or limited to specific nodes. This Skill pinpoints Docker awslogs failures on EC2-backed ECS nodes by inspecting Docker journal errors and building a failing-versus-clean node matrix. ## Core Features & Use Cases - Per-Node Journal Probing: Run SSM commands against one or more EC2 instances to grep the Docker journal for awslogs errors such as failed log stream creation and credential refresh failures. - Cluster-Wide Node Matrix: Automatically list active ECS container instances, map them to EC2 IDs, and probe each node to produce a failing-versus-clean comparison saved to a durable temp path. - Known Failure Pattern Reference: Consult documented guidance on the awslogs credential-refresh failure mode, including why drain and replacement is safer than assuming a Docker restart fixes it. - Use Case: An on-call engineer notices missing CloudWatch logs for some ECS services. They check one suspect node, compare it against a clean node, then build a cluster-wide matrix to identify the full failing-node set before draining. ## Quick Start Ask the agent to check whether ECS node i-0123456789abcdef0 has Docker awslogs failures since yesterday using your AWS profile and region.

Frequently Asked Questions about awslogs-investigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check why ECS tasks are not sending logs to CloudWatch?▼

Run the node check script with your AWS profile, region, a since timestamp, and the EC2 instance ID. It uses SSM to grep the Docker journal for awslogs errors like failed log stream creation and credential refresh failures.

How to find which ECS nodes have awslogs failures across a cluster?▼

Use the matrix script with the cluster name, profile, region, and timestamp. It lists active container instances, maps them to EC2 IDs, probes each node's Docker journal via SSM, and saves per-node results to a temp output directory.

Does this work with Fargate or other log drivers?▼

No. This workflow only applies to EC2-backed ECS nodes using the Docker awslogs log driver. It does not support Fargate tasks, CloudWatch Agent setups, or generic CloudWatch Logs querying.

Why do awslogs errors persist after restarting Docker on an ECS node?▼

A documented production case showed fresh credential-refresh errors appearing even after Docker and ECS restarts. Restart is only a diagnostic step; draining and replacing the failing node is the safer mitigation.

Can this skill restart Docker or modify ECS nodes?▼

No. The workflow is strictly read-only. It only runs SSM journal queries and never restarts Docker, drains nodes, or changes cluster state; remediation is handed off to a separate recovery process.