v1.7.3 — AI Diagnosis Overhaul + Auto-Collect Agents
The AI Diagnosis feature has been completely revamped with 3 export formats (DOCX/Markdown/PDF), scheduled reports (weekly/biweekly/monthly), and 6 Auto-Collect agents that automatically gather data from multiple sources. The EKS pages also received major UX improvements including cluster access management, Describe panel, and Service Resources tab.
AI Diagnosis Renewal · DOCX/MD/PDF Export · Scheduled Reports · 6 Auto-Collect Agents · FinOps MCP 5 Tools · EKS Cluster Access Management · Powerpipe Exit Code 2 Handling
AI Diagnosis Renewal
The route has been renamed from /diagnosis to /ai-diagnosis, and the entire UI has been revamped.
Before / After
| Item | Before (v1.7.2) | After (v1.7.3) |
|---|---|---|
| Route | /diagnosis | /ai-diagnosis |
| Name | Comprehensive Diagnosis | AI Diagnosis |
| Export | PPTX | DOCX + Markdown + PDF |
| Scheduled Reports | — | Weekly/Biweekly/Monthly |
| S3 Upload | — | Auto-upload DOCX + MD |
3 Export Formats
DOCX — Professional A4 report via docx package:
- Cover page (title, health score, account alias, date)
- Table of contents (hyperlinks, Heading 1-3)
- Section-specific accent colors (cost=green, security=red, network/EKS=purple, idle/MSK=orange)
- Markdown parsing (headings, tables, lists, blockquotes, inline code/bold/italic)
Markdown — All sections concatenated into a single .md file.
PDF — Dedicated print page at /ai-diagnosis/report:
- White background A4 layout with CSS
@media printpage breaks - "Print / Save as PDF" button triggers browser Print-to-PDF
// src/lib/report-docx.ts (key structure)
const doc = new Document({
sections: [
coverPage(title, healthScore, accountAlias, date),
tableOfContents(),
...sections.map(s => sectionPage(s, accentColor)),
],
});
const buffer = await Packer.toBuffer(doc);
Scheduled Reports
| Item | Description |
|---|---|
| Frequency | Weekly / Biweekly / Monthly |
| Timezone | KST (UTC+9) |
| Configuration | Day of week (0-6), day of month (1-28), hour (0-23) |
| Storage | data/report-schedule.json |
| Check interval | Every 5 minutes |
// src/lib/report-scheduler.ts
type Schedule = {
enabled: boolean;
frequency: 'weekly' | 'biweekly' | 'monthly';
dayOfWeek?: number; // 0=Sun ~ 6=Sat
dayOfMonth?: number; // 1~28
hour: number; // KST
language: 'ko' | 'en';
};
Toggle ON/OFF in the UI, set frequency/day/hour/language, and reports are automatically generated and uploaded to S3.
DOCX and Markdown files are automatically uploaded to awsops-deploy-{accountId}/reports/. Download via Presigned URLs valid for 7 days. S3 PutObject/GetObject permissions are automatically added to the CDK stack.
6 Auto-Collect Agents
Dedicated agents that automate data collection for the AI Diagnosis report. Each agent collects data from multiple sources in parallel and streams live status updates.
| Agent | Sources | Collected Data |
|---|---|---|
| EKS Optimize | Prometheus + K8s + Steampipe | CPU/memory usage, throttling, pod restarts, HTTP 5xx, node utilization |
| DB Optimize | Steampipe + CloudWatch | RDS/ElastiCache/OpenSearch discovery + metric-based rightsizing |
| MSK Optimize | Steampipe + CloudWatch + Prometheus | Broker metrics, message throughput, consumer lag, partition count |
| Idle Scan | Steampipe | Unattached EBS, gp2 volumes, unused EIPs, stopped EC2, 90+ day snapshots, unused SGs + cost estimation |
| Trace Analyze | Tempo/Jaeger + Prometheus | Per-service error traces, slow traces (>500ms) |
| Incident | CloudWatch + K8s + Prometheus | ALARM state alarms, Warning events, HTTP 5xx spikes, CPU spikes, memory pressure |
// src/lib/collectors/types.ts
export interface Collector {
collect(send: SendFn, accountId?: string, isEn?: boolean): Promise<CollectorResult>;
formatContext(data: CollectorResult): string;
analysisPrompt: string;
displayName: string;
}
All agents implement the same Collector interface. collect() uses Promise.allSettled for parallel multi-source collection and delivers progress via SendFn callback. To add a new agent, just implement this interface.
FinOps MCP Lambda
5 FinOps tools added to the Cost Gateway.
| Tool | Source | Description |
|---|---|---|
get_rightsizing_recommendations | Compute Optimizer | EC2/RDS/ECS/Lambda rightsizing + monthly savings |
get_savings_plans_recommendations | Cost Explorer | Savings Plans purchase recommendations (1yr/3yr, No Upfront) |
get_reserved_instance_recommendations | Cost Explorer | RI purchase recommendations (EC2/RDS/ElastiCache/Redshift) |
get_cost_optimization_hub_recommendations | Cost Optimization Hub | Unified optimization recommendations (Rightsize/Stop/Upgrade/SP) |
get_trusted_advisor_cost_checks | Trusted Advisor | Cost optimization category checks + flagged resources |
All tools support cross-account queries via the target_account_id parameter.
EKS/K8s Major UX Improvements
Cluster Access Management
| Feature | Description |
|---|---|
| Access Status Badge | Per-cluster "Access Entry" registration status |
| One-Click Registration | "Register ViewPolicy" button auto-creates Access Entry + Policy |
| Connection Detection | Detects actual connectivity by checking context_name in K8s query results |
| CLI Guide | Shows EC2 Role ARN-based registration commands for unconnected clusters |
New Features
| Feature | File | Description |
|---|---|---|
| Describe Panel | K9sDetailPanel | JSONB detail view (labels, annotations, containers, volumes, conditions) |
| Service Resources Tab | k8s.ts | Per-service CPU/Memory bar charts (Pod selector join) |
| Cluster Filter | k8s/page.tsx | Click cluster cards to filter nodes/pods/events/services |
| StatsCard Navigation | StatsCard.tsx | Nodes→/k8s/nodes, Pods→/k8s/pods, etc. click navigation |
| SQL Consolidation | queries/k8s.ts | Inline SQL moved to centralized query file + cache warmer |
Bug Fixes
external_ip→external_ipscolumn name fix (services 0/0 bug)- EC2 IAM Role ARN truncation fix (SQL
||operator filter conflict) - Prevent cluster filter toggle on Register click (
stopPropagation) - Post-registration polling for connection verification (5 attempts × 3s)
Benchmark: Powerpipe Exit Code 2 Handling
Powerpipe exits with exit code 2 when benchmark controls have alarms. This is expected behavior, but the previous code treated it as an error.
| Item | Before | After |
|---|---|---|
| Criteria | exit code === 0 | Output file exists + size > 0 |
| Exit code 2 | Error | Normal |
# Ignore exit code, validate by output file
powerpipe benchmark run ... > "${tmpFile}" 2>"${errorFile}"; \
if [ -s "${tmpFile}" ]; then
mv "${tmpFile}" "${resultFile}" && echo "done" > "${statusFile}";
else
echo "error" > "${statusFile}";
fi
Infrastructure: S3 Report Upload + update-infra Script
S3 Policy
S3 permissions added to the EC2 role in the CDK stack:
// infra-cdk/lib/awsops-stack.ts
ec2Role.addToPolicy(new iam.PolicyStatement({
actions: ['s3:PutObject', 's3:GetObject'],
resources: [`arn:aws:s3:::awsops-deploy-${this.account}/reports/*`],
}));
update-infra Script
00-update-infra.sh script for safe CDK stack updates without EC2 replacement:
- Read existing stack parameters — Preserve current CloudFormation values
- Reconstruct CDK context — Re-derive from live infrastructure (VPC, TGW, domain)
- cdk diff preview — Warn if EC2 would be replaced
- Deploy — Safe deployment with
--no-rollback
Version Comparison
| Item | v1.7.2 | v1.7.3 | Change |
|---|---|---|---|
| Diagnosis route | /diagnosis | /ai-diagnosis | Renamed |
| Export formats | PPTX | DOCX + MD + PDF | 3 formats |
| Scheduled reports | — | Weekly/Biweekly/Monthly | New |
| Auto-Collect | — | 6 agents | New |
| FinOps tools | — | 5 MCP tools | New |
| EKS access | Manual | One-click registration | Improved |
| Benchmark | Exit code dependent | Output file validation | Fixed |
Key File Changes
| File | Change |
|---|---|
src/app/ai-diagnosis/page.tsx | Diagnosis page renewal (route change, schedule UI) |
src/app/ai-diagnosis/report/page.tsx | PDF print-friendly page |
src/app/api/report/route.ts | Report generation API (15 sections, S3 upload) |
src/lib/report-docx.ts | DOCX generator (cover, TOC, section styles) |
src/lib/report-scheduler.ts | Scheduled report scheduler (5-min check) |
src/lib/report-prompts.ts | 15 section-specific Bedrock analysis prompts |
src/lib/report-generator.ts | Data collection orchestrator |
src/lib/collectors/*.ts | 6 Auto-Collect agents |
agent/lambda/aws_finops_mcp.py | FinOps MCP Lambda (5 tools) |
src/app/api/benchmark/route.ts | Powerpipe exit code 2 handling |
src/lib/queries/k8s.ts | K8s SQL query consolidation + Service Resources |
src/components/dashboard/StatsCard.tsx | Click navigation (href prop) |
infra-cdk/lib/awsops-stack.ts | S3 reports/* policy |
scripts/00-update-infra.sh | Safe infrastructure update script |