Database Rds Devopsのロゴ

Database Rds Devops

組織
aws
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
リポジトリtools-for-devops-agent
スキル名database-rds-devops
スター
120
フォーク
97
同梱ファイル
11
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 11個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    awsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Database Rds Devops」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/aws/tools-for-devops-agent/tree/main/skills/database-rds-devops
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aws/tools-for-devops-agent.git /tmp/tools-for-devops-agent
mkdir -p .claude/skills
cp -r /tmp/tools-for-devops-agent/skills/database-rds-devops .claude/skills/database-rds-devops
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDatabase Rds Devopsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にDatabase Rds Devopsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Database Rds Devopsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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 Health, Monitoring, Storage, Index Efficiency, Instrumentation

Combined Maximum: 110 points (Aurora MySQL) or 105 points (Aurora PostgreSQL)

Grading Scale:

Score RangeGradeInterpretation
90-100%AExcellent — minor optimizations only
80-89%BGood — address non-critical gaps
70-79%CFair — multiple improvements needed
60-69%DPoor — significant risk exposure
< 60%FCritical — immediate action required

Phase 4: Deep Diagnostics (9 Categories)

CATEGORY MAP:
├── 1. Server Information → Environment context (Query 1.1, 1.2)
├── 2. System Configuration → Parameter validation (Query 2.1, 2.2)
├── 3. Current Activity → Connection & thread analysis (Query 3.1-3.4)
├── 4. Replication Status → Lag & consistency (Query 4.1-4.2)
├── 5. Storage Capacity → Size, growth, fragmentation (Query 5.1-5.3)
├── 6. Performance Metrics → CPU, I/O, query stats (Query 6.1-6.4)
├── 7. Maintenance Health → Auto-increment, vacuum (Query 7.1)
├── 8. Optimization → Index usage, redundancy (Query 8.1-8.2)
└── 9. Summary & Score → Composite health score (Query 9.1)

Invoking Database Queries via MCP

When the rds-aidba MCP server is available, invoke queries using:

Tool: execute_health_query
Arguments:
  engine: "mysql"        # "mysql" or "postgresql"
  category: "3"          # Category number, 1 through 10
  query_id: "3.1"

Query Routing by User Symptom:

User ReportsCategoryQueries to Run
"high CPU"6 (Performance)6.1, 6.2, 6.4
"too many connections"3 (Activity)3.1, 3.2
"slow queries"6 (Performance)6.1, 6.3
"replication lag"4 (Replication)4.1, 4.2
"storage full"5 (Storage)5.1, 5.2, 5.3
"deadlocks" / "lock waits"3 (Activity)3.3, 3.4
"full health check"9 (Summary)9.1 (then expand failing dimensions)
"index optimization"8 (Optimization)8.1, 8.2
"auto-increment overflow"7 (Maintenance)7.1

If MCP is unavailable, fall back to:

  1. CloudWatch Metrics (Layer 2) for performance indicators
  2. CloudWatch Logs Insights (Layer 2) for slow query and error log analysis
  3. AWS CLI (Layer 1) for configuration validation
  4. Document the queries in the response so users can run them manually

See references/mysql-health-checks.md for all 23 MySQL queries and references/postgresql-health-checks.md for PostgreSQL queries.


Phase 5: Correlation Engine

CORRELATION RULES:
- High CPU + Slow Queries in logs → Identify top CPU-consuming queries
- Connection spike + "Too many connections" in error log → Connection exhaustion
- Replica Lag spike + Long transactions on writer → Writer blocking readers
- High IOPS + Large table scans → Missing indexes
- Storage growth + Fragmentation > 20% → OPTIMIZE TABLE needed
- MaximumUsedTransactionIDs > 1B (PG) → Wraparound risk
- Temp files detected (PG) + Low work_mem → Memory tuning needed

Phase 6: Recommendation Generation

For each finding, generate recommendations in this priority order:

  1. Immediate (CRITICAL) — Data loss or availability risk
  2. Short-term (WARNING) — Performance degradation or security gap
  3. Planned (INFO) — Best practice alignment, optimization opportunity

AWS CLI Tool Usage

Layer 1: Control Plane

ToolPurposeCommand
Describe ClusterFull cluster configurationaws rds describe-db-clusters --db-cluster-identifier <id>
Describe InstanceInstance-level configurationaws rds describe-db-instances --db-instance-identifier <id>
Check VersionsVersion currencyaws rds describe-db-engine-versions --engine <engine>
Cluster ParametersParameter group settingsaws rds describe-db-cluster-parameters --db-cluster-parameter-group-name <name>
Auto ScalingRead replica scaling configaws application-autoscaling describe-scalable-targets --service-namespace rds
Log FilesAvailable log file listingaws rds describe-db-log-files --db-instance-identifier <id>

Layer 2: CloudWatch Metrics

Collect key metrics for health assessment (3h window, 300s period):

aws cloudwatch get-metric-data --metric-data-queries '[...]' --start-time <3h-ago> --end-time <now>

Metrics and Thresholds:

Metric🟢 OK🟡 WARNING🔴 CRITICAL
CPUUtilization< 70%70-90%> 90%
DatabaseConnections< 80% of max80-90%> 90%
FreeableMemory> 2 GB1-2 GB< 1 GB
AuroraReplicaLag< 100ms100-1000ms> 1000ms
VolumeReadIOPsContext-dependent—Sudden 3x+ spike
VolumeWriteIOPsContext-dependent—Sudden 3x+ spike
MaximumUsedTransactionIDs< 1 Billion1-1.5B> 1.5B (PG only)

Layer 3: CloudWatch Logs Insights

Slow Query Log (Aurora MySQL):

Log group: /aws/rds/cluster/<cluster-id>/slowquery
Query: fields @timestamp, @message | filter @message like /Query_time/ | sort @timestamp desc | limit 50

Error Log (Aurora MySQL):

Log group: /aws/rds/cluster/<cluster-id>/error
Query: fields @timestamp, @message | filter @message like /ERROR|Warning|Note/ | stats count(*) by bin(1h)

PostgreSQL Log:

Log group: /aws/rds/cluster/<cluster-id>/postgresql
Query: fields @timestamp, @message | filter @message like /ERROR|FATAL|PANIC|duration/ | sort @timestamp desc | limit 50

Report Format

## Health Check Report

**Engine:** <engine-type> | **Cluster:** <cluster-id> | **Version:** <version>
**Writer:** <writer-id> | **Readers:** <count> (<ids>)
**Assessment Date:** <timestamp>

### Overall Health Score: <score>/<max> (Grade: <letter>)

### Health Dimensions
| Dimension | Score | Status |
|-----------|-------|--------|
| <dimension> | <0 or 5> | 🟢/🔴 |

### Critical Issues
❌ <Dimension>: <Issue> — <Impact> — <Remediation>

### Performance Metrics (Last 3 Hours)
| Metric | Min | Max | Average | Latest |
|--------|-----|-----|---------|--------|

### Recommendations (Priority Order)
1. 🔴 [CRITICAL] <action> — <expected outcome>
2. 🟡 [WARNING] <action> — <expected outcome>
3. 🟢 [INFO] <action> — <expected outcome>

Error Pattern Recognition

Aurora MySQL Error Log Patterns

PatternMeaningSeverityAction
Too many connectionsConnection limit reached🔴 CRITICALImplement RDS Proxy, increase max_connections
Aborted connectionClient disconnected unexpectedly🟡 WARNINGCheck application connection handling
Deadlock foundTransaction deadlock detected🟡 WARNINGReview transaction ordering, add indexes
InnoDB: page_cleanerBuffer pool pressure🟡 WARNINGScale up instance class
Lock wait timeout exceededLock contention🔴 CRITICALIdentify blocking transaction

Slow Query Patterns

PatternLikely CauseFix
High Query_time + High Rows_examinedMissing indexAdd composite index on WHERE/JOIN columns
High Query_time + Low Rows_examinedLock waitingResolve lock contention
Many queries with same DIGESTHot path queryOptimize or cache result
Temp table on diskTEXT/BLOB or large GROUP BYRestructure query, increase tmp_table_size

Platform Differences: Aurora MySQL vs RDS MySQL

AspectAurora MySQLRDS MySQL
StorageShared distributed volume (auto-scales to 128 TiB)EBS-backed (manual provisioned IOPS)
ReplicationRedo log-based (< 20ms typical)Binlog-based (seconds to minutes)
Failover30 seconds typical1-2 minutes
Buffer PoolAuto-warmed after restartCold start after restart
BacktrackSupported (rewind without restore)Not available
Read ReplicasUp to 15, same storage volumeUp to 5, async binlog
Monitoringmysql.ro_replica_status availableSHOW REPLICA STATUS only

Constraints

NEVER DO:

  • Execute DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE), or DCL (GRANT, REVOKE)
  • Expose database credentials in any output
  • Make configuration changes directly — always recommend, never execute
  • Assume engine type — always detect via API
  • Provide recommendations without supporting data
  • Skip severity classification on findings

ALWAYS DO:

  • Detect platform before running diagnostics
  • Include query numbers for traceability
  • Provide interpretation thresholds (OK/WARNING/CRITICAL) with every metric
  • Offer follow-up diagnostic paths after presenting findings
  • Note when a diagnostic requires database-level access vs. API-only
  • Include Aurora-specific context (shared storage, < 100ms expected lag, buffer pool auto-management)

Example Workflows

Workflow 1: Troubleshooting High CPU Usage

User Query: "My Aurora MySQL cluster has high CPU usage."

  1. Check CloudWatch CPU metrics via aws cloudwatch get-metric-data
  2. Query CloudWatch Logs Insights on slow query log for correlating queries
  3. Reference Query 3.1 (Connection Overview) for running threads
  4. Reference Query 6.2 (Top 10 CPU Intensive Queries)
  5. Reference Query 6.4 (Index Usage Statistics) for missing indexes
  6. Interpretation: Running threads > 50 = CRITICAL, > 20 = WARNING
  7. Recommend: Add missing indexes, optimize slow queries, consider read replicas

Workflow 2: Comprehensive Health Assessment

User Query: "Perform a full health check on my Aurora MySQL cluster."

  1. Run AWS CLI checks for configuration (encryption, Multi-AZ, backups, PI)
  2. Collect CloudWatch metrics (CPU, connections, IOPS, replica lag)
  3. Reference Query 1.1 (Server Information) and 1.2 (Environment Detection)
  4. Reference Query 2.1 (Critical MySQL Variables) for config validation
  5. Reference Query 9.1 (Overall Health Score) for 8-dimension DB scoring
  6. Combine AWS-level and database-level findings
  7. Provide prioritized recommendations by grade

Workflow 3: Connection Exhaustion

User Query: "Getting 'Too many connections' errors."

  1. Check CloudWatch DatabaseConnections metric
  2. Query CloudWatch Logs for error patterns
  3. Reference Query 3.1 (Connection Overview) — current vs max
  4. Reference Query 3.2 (Thread Details) — identify sources
  5. Interpretation: > 90% = CRITICAL, > 80% = WARNING
  6. Recommend: Implement RDS Proxy, increase max_connections, fix connection leaks

Workflow 4: Replication Lag

User Query: "My Aurora read replica has high lag."

  1. Check CloudWatch AuroraReplicaLag metric
  2. Query CloudWatch Logs for errors on reader instances
  3. Reference Query 4.2 (Aurora Replica Lag Detail)
  4. Reference Query 3.3 (Active Transactions) on writer
  5. Interpretation: Aurora > 100ms = WARNING (unusual), > 1000ms = CRITICAL
  6. Recommend: Check heavy reader workloads, long writer transactions, scale reader

Workflow 5: PostgreSQL Transaction ID Wraparound

User Query: "Check for transaction ID wraparound risk."

  1. Check CloudWatch MaximumUsedTransactionIDs metric
  2. Reference PG Query 7.2 (Database Transaction ID Age)
  3. Reference PG Query 7.3 (Top 5 Aged Tables)
  4. Interpretation: Age > 1.5 billion = CRITICAL, > 1 billion = WARNING
  5. Recommend: Run manual VACUUM immediately, tune autovacuum_freeze_max_age
  6. Emphasize: Wraparound causes database shutdown at 2 billion transactions

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでDatabase Rds Devopsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Database Rds Devopsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDatabase Rds Devopsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/aws/tools-for-devops-agent/tree/main/skills/database-rds-devopsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Database Rds Devopsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Database Rds Devopsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDatabase Rds Devopsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Database Rds Devops」は無料ですか?

はい。awsがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇