analytics-opensearch-expertise
Amazon OpenSearch Service domain health assessment. Performs read-only, API-driven checks against a customer's OpenSearch domain(s) covering cluster health, node/shard configuration, performance metrics, security posture, and cost optimization signals. Activate this skill for requests about OpenSearch or Elasticsearch domain health, cluster review, domain assessment, performance, security posture, or cost optimization. Given a domain ARN (or name + region), it produces a structured findings report with prioritized recommendations. All checks use read-only AWS control-plane APIs (es:Describe*, es:GetCompatibleVersions, es:DescribeReservedInstances, cloudwatch:GetMetricData) — no data-plane access required.
aws · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add aws/tools-for-devops-agent --skill analytics-opensearch-expertise技能说明
name: analytics-opensearch-expertise description: "Amazon OpenSearch Service domain health assessment. Performs read-only, API-driven checks against a customer's OpenSearch domain(s) covering cluster health, node/shard configuration, performance metrics, security posture, and cost optimization signals. Activate this skill for requests about OpenSearch or Elasticsearch domain health, cluster review, domain assessment, performance, security posture, or cost optimization. Given a domain ARN (or name + region), it produces a structured findings report with prioritized recommendations. All checks use read-only AWS control-plane APIs (es:Describe*, es:GetCompatibleVersions, es:DescribeReservedInstances, cloudwatch:GetMetricData) — no data-plane access required." metadata: version: "2.6" author: genealpe
OpenSearch Domain Health Assessment
Overview
This skill performs a comprehensive, read-only health assessment of Amazon OpenSearch Service domains using AWS APIs available through the customer's local AWS profile. It produces a structured report with findings and actionable recommendations.
Scope: CLI-agent compatible. No external packages, no IDE workspace, no human review gates.
Trigger Keywords
opensearch, opensearch health, domain health, cluster review, opensearch review, opensearch assessment, opensearch check, open search, opensearch performance, opensearch security, opensearch cost
Prerequisites
- AWS CLI profile configured with read-only access to the target account
- IAM permissions required:
es:DescribeDomaines:DescribeDomainHealthes:GetCompatibleVersionses:DescribeReservedInstanceses:ListDomainNamescloudwatch:GetMetricData
Execution Flow
Input
Required: Domain ARN (e.g., arn:aws:es:us-west-2:123456789012:domain/my-domain)
Parse the ARN to extract:
- Region: field 4 (e.g.,
us-west-2) - Account ID: field 5 (e.g.,
123456789012) - Domain name: after
domain/in field 6
Fallback / Target Resolution (apply these rules exactly — never silently substitute a target):
- Exact match: the ARN (or name + region) resolves via
DescribeDomain→ proceed with the assessment. - No domain specified: run
ListDomainNamesin the user's likely region(s) (cross-region scan if needed) and present the discovered domains as options for the user to choose. Do not pick one yourself unless exactly one domain exists in the entire account — state that you did so. - Specified but NOT found: search for candidates (
ListDomainNamesin the ARN's region, then other regions). Then STOP and confirm — do NOT assess:- Report clearly: "Domain {given} not found in {region}."
- List the closest candidate(s) with their regions (e.g., name differs by a suffix, or same name in another region).
- Ask the user to confirm which domain to assess. Never run the assessment against a domain the user did not name without their explicit confirmation — in accounts with similarly-named sibling domains (e.g.,
prod-es-content/prod-es-users), a silently substituted target produces a confident report about the wrong domain, which is worse than an error.
- If the user provides only a domain name with no region, ask for the region (or apply rule 3's candidate search).
Steps
1. Parse domain ARN → region, account, domain name
2. Resolve the target (Target Resolution rules above) — confirm with the user if not an exact match
3. Describe domain configuration (DescribeDomain)
4. Describe domain health (DescribeDomainHealth)
5. Pull CloudWatch metrics (last 24h)
6. Check upgrade eligibility (GetCompatibleVersions; ListVersions fallback)
7. Check reserved instance coverage (DescribeReservedInstances)
8. Analyze findings against thresholds
9. Load the Remediation Reference — read_skill_resource(skill_id='analytics-opensearch-expertise',
path='references/remediation-reference.md') — MANDATORY before writing recommendations
10. Generate report with recommendations
API Compatibility (DevOps Agent tooling)
The DevOps Agent AWS tool exposes the LEGACY Elasticsearch-compatible client. Call legacy operation names FIRST; fall back to the modern names only if the legacy call fails:
| Purpose | Try first (legacy) | Modern equivalent |
|---|---|---|
| Domain config | describe_elasticsearch_domain | describe_domain |
| Version catalog | list_elasticsearch_versions | list_versions |
| Upgrade targets | get_compatible_elasticsearch_versions | get_compatible_versions |
| Reserved instances | describe_reserved_elasticsearch_instances | describe_reserved_instances |
- IAM note: the execution role's managed policy grants
es:Describe*andes:List*— Describe/List operations succeed under either naming;Get*actions (BOTH GetCompatible variants) are typically denied. This is exactly why the 1.4 ListVersions fallback exists. DescribeDomainHealthhas NO legacy equivalent. If it fails, do NOT skip checks 2.2/2.3 — use CloudWatch instead:Shards.active(Maximum) = active shards,Shards.unassigned(Maximum) = unassigned, TotalShards ≈ active + unassigned;ClusterStatus.green/yellow/redfor 1.1/3.7. Never report the checks as SKIPPED when this fallback is available.- All CloudWatch metrics in this skill: namespace
AWS/ES, dimensionsDomainNameandClientId(the account ID).
Checks & Decision Logic
Category 1: Cluster Health & Configuration
1.1 Cluster Status
- API:
DescribeDomainHealth - Field:
ClusterHealth(green | yellow | red) - Logic:
- GREEN → ✅ All primary and replica shards assigned
- YELLOW → ⚠️ All primaries assigned, some replicas unassigned
- RED → 🔴 Some primary shards unassigned — data loss risk
1.2 Node Count & AZ Balance
- API:
DescribeDomain→ClusterConfig - Fields:
InstanceCount,ZoneAwarenessEnabled,AvailabilityZoneCount - Logic:
- If