Check ID: opensearch_service_domains_not_publicly_accessible
Provider: AWS
Service: opensearch
Severity: CRITICAL
Categories: internet-exposed
Resource type: AwsOpenSearchServiceDomain

What this check verifies

Amazon OpenSearch domains are assessed for public exposure via their resource-based access policies. Domains inside a VPC are treated as privately reachable; domains with overly permissive policies that allow broad, unauthenticated access are identified as publicly accessible.

Risk

Public exposure lets anyone query, index, or delete data, impacting confidentiality (record disclosure), integrity (unauthorized writes, index tampering), and availability (disruption, deletion). Attackers can harvest sensitive logs/PII, alter analytics, or wipe indices, enabling lateral movement and operational outage.

Recommendation

Apply least privilege and defense in depth:
  • Place domains in a VPC and restrict reachability with security groups
  • Use narrow resource policies; avoid Principal:"*"
  • Require authenticated access (fine-grained controls); if unavoidable, limit public endpoints by IP and roles
  • Monitor access with logs and alerts

Remediation

aws opensearch update-domain-config --domain-name <DOMAIN_NAME> --access-policies '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::<ACCOUNT_ID>:root"},"Action":"es:*","Resource":"arn:aws:es:<REGION>:<ACCOUNT_ID>:domain/<DOMAIN_NAME>/*"}]}'

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = opensearch_service_domains_not_publicly_accessible. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks