aws-opensearch

Query, diagnose, and remediate Amazon OpenSearch Service domains using SigV4-signed requests.

2|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill aws-opensearch-mbadali25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-opensearch
Source: https://github.com/mbadali25/useful-claude-add-ons/tree/main/skills/aws-opensearch
Command: npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill aws-opensearch-mbadali25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires boto3, requests, and includes scripts (resource) and references (resource) components.

What problem does it solve? Working with a managed Amazon OpenSearch Service domain requires SigV4 request signing, IAM access-policy knowledge, and careful handling of destructive operations like reindexing or index deletion. This Skill provides a signed client and operational playbook so you can inspect cluster health, search indices, fix red/yellow clusters, and manage dashboards without hand-signing curl requests or risking unreviewed destructive changes. ## Core Features & Use Cases - SigV4-signed client: A Python helper script handles credential resolution, request signing, and JSON handling for every call to an es.amazonaws.com endpoint. - Read and diagnose: Check cluster health, list indices, inspect mappings and settings, run searches and counts, and explain unassigned shards. - Safe remediation: Reindex, edit mappings and settings, manage ISM policies and snapshots, and run update/delete-by-query — all dry-run by default with an explicit --confirm gate. - Dashboards management: Export, edit, and import OpenSearch Dashboards saved objects as NDJSON across domains and tenants. - Use Case: Your logs cluster turns yellow after a node change. Run the allocation command to see why shards are unassigned, retry failed allocations, and reduce replica counts on legacy indices — all with dry-run previews before anything changes. ## Quick Start Ask the assistant to check the health of your OpenSearch domain and list any unassigned shards, providing your domain endpoint and AWS region.

Frequently Asked Questions about aws-opensearch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect to an Amazon OpenSearch domain with IAM authentication?

Set OPENSEARCH_ENDPOINT to your domain URL and provide AWS credentials via AWS_PROFILE, access keys, or an attached IAM role. The client signs every request with SigV4 using service name es and the domain's region, resolved through botocore's default credential chain.

How do I fix unassigned shards in an OpenSearch cluster?

Run the allocation command to get the per-shard explanation, then match the reason: retry failed allocations for transient failures, free disk if watermarks are exceeded, or reduce replica counts if nodes are insufficient. Never force-allocate a stale primary, since that discards data.

Why am I getting a 403 error from my OpenSearch domain?

A 403 means either the IAM principal is not allowed by the domain access policy or fine-grained access control has not mapped your role. Check the error message body, verify your caller identity with aws sts get-caller-identity, and confirm the region and session token are correct.

Can I change an existing field's mapping type in OpenSearch?

No, existing field types cannot be changed in place because mappings are largely immutable. You must create a new index with the corrected mapping, reindex the data into it, validate counts, and cut over using an alias.

Does this work with Amazon OpenSearch Serverless?

Yes, but Serverless collections require signing with service name aoss instead of es, which the client supports via a parameter. Note that cluster-level APIs like _cluster and _cat largely do not exist on Serverless, so most remediation commands are managed-domain only.

How do I export and import OpenSearch Dashboards between domains?

Use the dashboards-export command to write saved objects as NDJSON with deep references included, edit the file in version control, then run dashboards-import against the target domain. Ensure index-pattern IDs exist in the target domain or are included in the export.