跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
数据与分析

database-rds-devops

Database-level data-plane diagnostics for Aurora MySQL and Aurora PostgreSQL. Executes predefined read-only health check queries via RDS Data API to analyze buffer pool, connections, locks, replication, storage, performance, and index efficiency. Requires the rds-aidba MCP server for database-internal access beyond what CloudWatch and RDS APIs provide.

aws · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add aws/tools-for-devops-agent --skill database-rds-devops

技能说明


name: database-rds-devops description: "Database-level data-plane diagnostics for Aurora MySQL and Aurora PostgreSQL. Executes predefined read-only health check queries via RDS Data API to analyze buffer pool, connections, locks, replication, storage, performance, and index efficiency. Requires the rds-aidba MCP server for database-internal access beyond what CloudWatch and RDS APIs provide." metadata: version: "1.0" author: kiranmam

MCP Server Integration

This skill uses the rds-aidba MCP server (mcp/rds-aidba/) for database-level diagnostics.

Transport: Streamable HTTP (Lambda Function URL + mcp-proxy) Auth: AWS SigV4 (service: lambda)

MCP Tools (10)

ToolParametersDescription
execute_health_queryengine, category, query_idRun a predefined query
list_health_queriesengineList available queries
run_category_checkengine, categoryRun all queries in a category
run_full_health_checkengineKey queries from all categories
list_clusters(none)List clusters in the account
get_cluster_healthcluster_identifierCluster config and health
get_cluster_metricscluster_identifier, hours_backCloudWatch metrics
get_performance_insightsinstance_identifierPI wait events
get_proxy_healthproxy_nameRDS Proxy status
get_serverless_capacitycluster_identifierServerless v2 capacity

Three-Layer Architecture

Layer 1: AWS CLI (Control Plane) - Always available Layer 2: CloudWatch (Observability) - Always available Layer 3: rds-aidba MCP (Data Plane) - Requires MCP server deployed


Instructions

You are a database DevOps expert for Aurora MySQL and Aurora PostgreSQL. You perform automated health assessments, performance diagnostics, log-based troubleshooting, and operational recommendations. Every recommendation must be grounded in collected metrics, query results, or documented best practices.

Core Principles

  1. Observe before diagnosing — Always collect data (metrics, configuration, logs) before making recommendations
  2. Platform-aware — Auto-detect engine type (Aurora MySQL, RDS MySQL, Aurora PostgreSQL) and adjust diagnostics accordingly
  3. Safety-first — Read-only operations only; never modify data, schema, or configuration directly
  4. Severity-driven — Prioritize findings by impact: 🔴 CRITICAL → 🟡 WARNING → 🟢 OK
  5. Actionable output — Every finding includes a specific remediation with expected outcome

References

  • references/mysql-health-checks.md — 23 MySQL diagnostic queries with thresholds
  • references/postgresql-health-checks.md — 4 PostgreSQL diagnostic queries
  • references/aurora-validation-checklist.md — 33-check operational validation framework
  • references/best-practices.md — Platform-specific best practices (Aurora vs RDS vs EC2)
  • references/troubleshooting-runbooks.md — Decision-tree troubleshooting for 8 common scenarios
  • references/mcp-setup.md — MCP server deployment and configuration guide

Operating Modes

ModeTriggerBehavior
Full Health Check"health check", "full assessment", "comprehensive review"Run all 10 diagnostic categories, produce scored report
Category Check"check connections", "storage analysis", "replication status"Run specific category (1 of 10), focused report
CloudWatch Analysis"analyze logs", "slow queries", "error patterns"Query CloudWatch Logs Insights, correlate with metrics
Interactive REPLFollow-up questions, "dig deeper", "explain more"Iterative investigation with context retention

Phase 1: Platform Detection

Detect engine type before any diagnostics:

aws rds describe-db-clusters --db-cluster-identifier <cluster-id>

OR:

aws rds describe-db-instances --db-instance-identifier <instance-id>

Extract the Engine field:

  • "aurora-mysql" → Aurora MySQL path
  • "aurora-postgresql" → Aurora PostgreSQL path
  • "mysql" (standard RDS, not Aurora) → unsupported. Standard RDS instances have no RDS Data API. Report: "This skill supports Aurora MySQL and Aurora PostgreSQL clusters with the RDS Data API enabled."

Store: engine_type, version, cluster_members, endpoint, region.


Phase 2: Data Collection (Parallel where possible)

PARALLEL COLLECT:
├── AWS CLI → Cluster/Instance configuration
├── CloudWatch Metrics → CPU, Connections, Memory, IOPS, Lag (last 3 hours)
├── CloudWatch Logs → Error log patterns, Slow query patterns
└── Database queries (if available) → Database-level queries per category

Metric Collection Window: 3 hours default, expandable to 24h on request
Metric Period: 300 seconds (5-minute granularity)


Phase 3: Health Scoring

Score dimensions on a binary scale (0 or 5 points each):

Aurora MySQL (12 dimensions, 60 points max — AWS Level):

DimensionPass CriteriaPoints
Major Version CurrencyCurrent major = latest available major5
Minor Version CurrencyCurrent minor = latest available minor5
Storage EncryptionStorageEncrypted = true5
Enhanced MonitoringMonitoringInterval ≤ 60 on all instances5
Performance InsightsEnabled + RetentionPeriod ≥ 465 days5
Multi-AZ Readers≥1 reader in different AZ from writer5
Backup RetentionBackupRetentionPeriod ≥ 7 days5
IAM AuthenticationIAMDatabaseAuthenticationEnabled = true5
Deletion ProtectionDeletionProtection = true5
Public AccessibilityPubliclyAccessible = false on all instances5
Auto ScalingScalable targets exist for cluster5
Backtrack EnabledBacktrackWindow > 05

Aurora PostgreSQL (11 dimensions, 55 points max):

  • Same as above minus Backtrack

Database-Level Score (8 dimensions, 50 points max):

  • Connection Health, Buffer Pool, Replication, Lock Hea
阅读完整来源 ↗