copilot-logs

Investigate CloudWatch logs for AWS Copilot-deployed services to diagnose failures.

Updated Mar 2, 2019
One-click install
npx skills add https://github.com/trmaphi/dotfiles --skill copilot-logs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: copilot-logs
Source: https://github.com/trmaphi/dotfiles/tree/main/.claude/skills/copilot-logs
Command: npx skills add https://github.com/trmaphi/dotfiles --skill copilot-logs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers quickly diagnose issues in services deployed with AWS Copilot by surfacing and analyzing logs from CloudWatch.

Core Features & Use Cases

  • CloudWatch log triage: Filter Copilot logs across environments to identify error patterns and deployment failures.
  • Insights-driven search: Use CloudWatch Insights queries to surface exceptions, trends, and high-severity events.
  • JSON and text log normalization: Normalize and flatten JSON logs for easier reading and correlation with service manifests.

Quick Start

Filter the Copilot log group '/copilot/<App>-<Env>-<Service>' for error patterns to quickly identify the root cause.

Frequently Asked Questions about copilot-logs

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

FAQPage Schema
How do I investigate AWS Copilot deployment failures using CloudWatch logs?

Investigate AWS Copilot deployment failures by filtering the CloudWatch log group '/copilot/<App>-<Env>-<Service>' to surface error patterns, deployment issues, and service crashes across environments. This process quickly identifies the root cause of failures.

How do I filter Copilot container logs to find service crash errors?

Filter Copilot container logs by applying CloudWatch Insights queries to the '/copilot/<App>-<Env>-<Service>' log group to surface exceptions, high-severity events, and crash patterns. This triage method isolates specific failure points across development and production deployments.

Can I normalize JSON and plain-text CloudWatch logs from Copilot deployments?

Yes, you can normalize and flatten JSON and plain-text CloudWatch logs from Copilot deployments for easier reading. This normalization correlates log entries with service manifests to streamline the investigation of unexpected errors.

What AWS CLI tools work with Copilot svc logs for diagnosing service issues?

The AWS CLI tools 'aws logs' and 'copilot svc logs' work together to query and surface CloudWatch logs for Copilot-deployed services. These tools handle log extraction across development, staging, and production environments to diagnose failures.

Why is my AWS Copilot service crashing after a successful deployment?

AWS Copilot service crashes post-deployment often appear in the '/copilot/<App>-<Env>-<Service>' CloudWatch log group as unexpected errors or exceptions. Surfacing these specific log patterns reveals the underlying runtime failure causing the crash.

Does this log investigation approach support both development and production Copilot environments?

Yes, this log investigation approach supports debugging AWS Copilot deployments across development, staging, and production environments. It applies CloudWatch Insights queries to the standard Copilot log group pattern to surface failures regardless of environment tier.