Skip to content
Back to skills

Aws Staging Cli

ASecurity

AWS CLI reference for Vessel staging environment (account 643610656178, ca-central-1). Use when troubleshooting staging infrastructure, checking logs, monitoring RDS/EC2/ECS, investigating slow queries, or debugging application errors. Covers CloudWatch Logs, RDS, EC2, ALB, Lambda, ECS, S3, SNS/SQS, Secrets Manager, WAF.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
devopsbashsqlawsdebuggingdatabase

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill aws-staging-cli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aws Staging Cli?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Aws Staging Cli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-aws-staging-cli/badge)](https://www.skillsdirectory.com/skills/david-li0406-aws-staging-cli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: aws-staging-cli
description: AWS CLI reference for Vessel staging environment (account 643610656178, ca-central-1). Use when troubleshooting staging infrastructure, checking logs, monitoring RDS/EC2/ECS, investigating slow queries, or debugging application errors. Covers CloudWatch Logs, RDS, EC2, ALB, Lambda, ECS, S3, SNS/SQS, Secrets Manager, WAF.
---

# AWS Staging CLI Reference

## Environment

- **Account**: 643610656178
- **Region**: ca-central-1
- **Role**: Developer

## Key Resources

| Type | Name/ID | Notes |
|------|---------|-------|
| Log Group | `/vessel/apps` | Main app logs (JSON), 19+ GB |
| Log Group | `/vessel/llm` | LLM service logs |
| RDS | `vessel-staging` | Main database |
| RDS | `discovery-staging` | Discovery database |
| EC2 | `i-02e16bc2983c9c49c` | app-server (c6g.large) |
| EC2 | `i-0be15186fed003ac6` | app-server (c6g.large) |
| ALB | `alb-vessel-apps-staging` | Main ALB |
| ECS Cluster | `tools-cluster-staging` | Fargate cluster |
| ECS Service | `n8n-staging` | n8n service |

## Common Workflows

### Investigate Application Errors
```bash
# Tail live errors
aws logs tail /vessel/apps --follow --filter-pattern '{ $.level >= 40 }'

# Last hour errors
START_TIME=$(($(date +%s) - 3600))000
aws logs filter-log-events --log-group-name /vessel/apps \
  --filter-pattern '{ $.level >= 40 }' --start-time $START_TIME \
  | jq -r '.events[].message | fromjson | "\(.time) | \(.err.message // .msg)"'
```

### Find Slow Requests
```bash
# Requests > 1s (excluding long polls)
START_TIME=$(($(date +%s) - 3600))000
aws logs filter-log-events --log-group-name /vessel/apps \
  --filter-pattern '{ $.responseTime > 1000 }' --start-time $START_TIME --max-items 500 \
  | jq -r '.events[].message | fromjson | select(.request.url | (contains("LongPoll") or contains("longpoll")) | not) | "\(.responseTime)ms - \(.request.url // "unknown")"' \
  | sort -rn | head -10
```

### Check Database Health
```bash
# RDS status
aws rds describe-db-instances --query 'DBInstances[*].[DBInstanceIdentifier,DBInstanceStatus]' --output table

# DB CPU (last hour)
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name CPUUtilization \
  --dimensions Name=DBInstanceIdentifier,Value=vessel-staging \
  --start-time $(date -u -v-1H -I) --end-time $(date -u -I) --period 300 --statistics Average,Maximum

# Slow queries in PostgreSQL logs
aws logs tail /aws/rds/instance/vessel-staging/postgresql --follow --filter-pattern 'duration'
```

### Check Alarms
```bash
# All alarms in ALARM state
aws cloudwatch describe-alarms --state-value ALARM --output table
```

### SSH to Instance
```bash
aws ssm start-session --target i-02e16bc2983c9c49c
```

### Force ECS Redeployment
```bash
aws ecs update-service --cluster tools-cluster-staging --service n8n-staging --force-new-deployment
```

## Log JSON Structure

`/vessel/apps` logs are JSON with key fields:
- `level`: 30=info, 40=warn, 50=error
- `responseTime`: Request duration (ms)
- `requestId`: Unique request ID
- `name`: Service name (http, worker, discovery-mcp)
- `request.url`: Endpoint
- `msg`: Human-readable message

## Troubleshooting

### SSO Expired
```bash
aws sso login
```

### zsh Timestamp Issues
Calculate timestamp first:
```bash
START_TIME=$(($(date +%s) - 3600))000
aws logs filter-log-events --log-group-name /vessel/apps --start-time $START_TIME ...
```

## Full Reference

See [references/cli-commands.md](references/cli-commands.md) for complete command reference including: CloudWatch Logs Insights queries, RDS metrics, EC2 commands, ALB/target groups, Lambda, ECS, S3, SNS/SQS, Secrets Manager, WAF, VPC/networking.

Files in this skill

  • .DS_Store6 KB
  • SKILL.md3.6 KB
  • references/cli-commands.md11.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…