Index of every page on this site: llms.txt
All skills
Run it yourself

Deploy OpenSearch search applications to managed cloud providers. Use this skill when the user wants to provision an OpenSearch domain or serverless collection on AWS, provision a managed OpenSearch service on Aiven, deploy search configurations, set up Bedrock connectors, configure IAM roles for OpenSearch, or migrate a local setup to a managed OpenSearch. Activate even if the user says AOS, AOSS, OpenSearch Service, serverless collection, Bedrock connector, SigV4, AWS deployment, Aiven, or managed OpenSearch.

Use this Skill: https://skilld.dev/gh/opensearch-project/opensearch-agent-skills/cloud

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

querying-opensearch-catalog-assetsreferencesaccess-denied.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Access denied (401 / 403)

Goal: name the layer that denied the request, confirm it with read-only calls where you are allowed to, and propose the smallest read-only grant for this one index. You never apply it.

1. Collect the facts

  • Status code, the x-aoss-response-hint response header (AOSS; send the request with awscurl -i or curl -D - to see headers), and error.type / reason or Message from the body.
  • aws sts get-caller-identity. For an assumed role (arn:aws:sts::<acct>:assumed-role/<role>/<session>) get the role ARN, path included, with aws iam get-role --role-name <role> --query Role.Arn. Grants name the role ARN, never the session ARN.

2. Find the layer

Check signing first: a signing error looks like an access denial.

Engine Signal Layer
both 403 with a signature or credential message Signing: service name (aoss/es), Region, x-amz-content-sha256 signed, session token sent, no :443, credentials not expired. Fix and retry once.
AOSS 401, hint X01:network-policy-deny Network policy does not allow this source (public, or a VPC endpoint).
AOSS 403, hint X01:gw-helper-deny Data access policy does not grant this principal the operation on index/<collection-name>/<index>.
AOSS 403, no hint, signing correct IAM or the data access policy: a data access policy denial can also come without a hint, as authorization_exception or security_exception. Check both in step 3 before naming the layer.
AOS 403 Message naming an es:ESHttp* action Domain resource policy or the principal's IAM policy.
AOS 403 security_exception, reason starts no permissions for [ Fine-grained access control: the principal is not mapped to a role that can read the index.
AOS 401 Request unsigned or credentials expired. Re-sign. Never ask for a master user or password.

3. Confirm (read-only; each call may itself be denied, which is fine to report)

AOSS:

aws opensearchserverless list-security-policies --type network --resource "collection/<collection-name>"
aws opensearchserverless get-security-policy --type network --name <name>
aws opensearchserverless list-access-policies --type data --resource "collection/<collection-name>"
aws opensearchserverless get-access-policy --type data --name <name>
aws iam simulate-principal-policy --policy-source-arn <role-arn> \
  --action-names aoss:APIAccessAll --resource-arns <collection-arn>

Look for a rule whose resource matches collection/<collection-name> (network) or index/<collection-name>/<index> (data, patterns allowed) and whose principals include the role ARN. Data access policies name the collection by name, not ID. IAM allows aoss:APIAccessAll and no data access rule covers the index for this role: the data access policy is the layer.

AOS:

aws opensearch describe-domain --domain-name <name> --query DomainStatus.AccessPolicies

With FGAC enabled, GET /_plugins/_security/authinfo (Elasticsearch: /_opendistro/_security/authinfo) is allowed for any authenticated user and returns your user_name, backend_roles and roles. No role that grants read on the index means the mapping is missing.

4. Propose the grant (do not apply it)

Present it as: layer, identity (role ARN), scope (this index only), exact JSON, and who can apply it (the collection or domain administrator). If the user asks you to apply it, follow security rule 3 in SKILL.md.

AOSS data access policy rule:

[{"Description": "Read-only access to <index>",
  "Rules": [{"ResourceType": "index",
             "Resource": ["index/<collection-name>/<index>"],
             "Permission": ["aoss:DescribeIndex", "aoss:ReadDocument"]}],
  "Principal": ["<role-arn>"]}]

AOSS IAM statement: {"Effect": "Allow", "Action": "aoss:APIAccessAll", "Resource": "<collection-arn>"}

AOSS network policy: do not propose public access. Tell the user the request must come from a source the policy already allows, or an administrator must add that source's VPC endpoint.

AOS domain access policy statement. Name the read paths, never <index>/*: ESHttpPost on the whole index would also allow writes such as _bulk and _update_by_query.

{"Effect": "Allow", "Principal": {"AWS": "<role-arn>"},
 "Action": ["es:ESHttpGet", "es:ESHttpHead", "es:ESHttpPost"],
 "Resource": [
   "arn:aws:es:<region>:<account>:domain/<domain>/<index>/_search*",
   "arn:aws:es:<region>:<account>:domain/<domain>/<index>/_count",
   "arn:aws:es:<region>:<account>:domain/<domain>/<index>/_msearch",
   "arn:aws:es:<region>:<account>:domain/<domain>/<index>/_mapping",
   "arn:aws:es:<region>:<account>:domain/<domain>/<index>/_field_caps"]}

Add domain/<domain>/_plugins/_sql or _plugins/_ppl only if the user needs SQL or PPL: those paths are domain-wide, so with FGAC off they reach every index.

AOS FGAC role and mapping (Elasticsearch: _opendistro instead of _plugins). PUT on an existing mapping replaces it, so tell the administrator to add the backend role to it instead:

PUT _plugins/_security/api/roles/<index>-read
{"index_permissions": [{"index_patterns": ["<index>"], "allowed_actions": ["read"]}]}

PUT _plugins/_security/api/rolesmapping/<index>-read
{"backend_roles": ["<role-arn>"]}

Add "cluster_permissions": ["cluster_composite_ops_ro"] only if you need _msearch or _mget.

Another account

AOSS data access policies accept only principals in the collection's account. Cross-account reads need a role in that account that the user may assume; ask the user for it.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill is a navigational index and configuration guide for deploying OpenSearch to cloud environments like AWS and Aiven. It contains no executable code or malicious patterns.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at c4f7b1e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 6 days ago
metadata
{
  "author": "opensearch-project",
  "version": "2.0"
}
Other metadata
compatibility
AWS deployment requires AWS credentials (IAM role or access keys). Aiven deployment requires the Aiven MCP server and an Aiven API token.

README badge

README badge for opensearch-project/opensearch-agent-skills/cloud