A collection of AWS Security controls for Amazon OpenSearch (Formerly Amazon Elasticsearch). Controls include templates to provision Amazon OpenSearch domains, CloudWatch events and alarms for monitoring as well as Config rules. Configuration templates are available in AWS CloudFormation, AWS CLI and Terraform

OpenSearch
Amazon OpenSearch Domain

Configuration template to provision an OpenSearch Domain (formerly Amazon Elasticsearch Domain), with settings such as VPC access, number of master and data nodes, encryption (at-rest and node-to-node), logging settings, and more.

CloudFormationTerraformAWS CLI
OpenSearch Domain with Custom Access Policy

Configures an OpenSearch domain with a custom access policy using IAM policy documents.

Terraform
Log Publishing to CloudWatch Logs for OpenSearch

Sets up log publishing from an OpenSearch domain to CloudWatch Logs with appropriate IAM permissions.

Terraform
Enabling Fine-Grained Access Control on OpenSearch

Demonstrates the configuration of an OpenSearch domain with and without fine-grained access control.

Terraform
OpenSearch Domain Creation with IP Restricted Access Policy

Creates an OpenSearch domain and sets an access policy that restricts access to a specific IP address.

Terraform
Basic SAML Authentication for AWS OpenSearch Domain

Configures an AWS OpenSearch Domain with SAML authentication options, including identity provider settings.

Terraform
AWS Opensearch Inbound Connection Accepter Basic Usage

This template sets up an inbound connection accepter for AWS Opensearch, linking two domains possibly across different AWS accounts.

Terraform
Basic AWS Opensearch Outbound Connection

Creates a basic outbound connection for AWS Opensearch with direct connection mode.

Terraform
Basic Opensearch Package Setup

Creates an S3 bucket and an object, then sets up an Opensearch package using the object from the S3 bucket.

Terraform
Basic Opensearch Domain and Package Association

This template sets up an AWS Opensearch domain and associates a TXT dictionary package with it.

Terraform
OpenSearch Serverless
OpenSearch Serverless Access Policy

This template creates an access policy for OpenSearch Serverless. The access policy allows a user to access the resources within a collection, providing full access to the specified collection and indexes. The access policy is associated with the user 'test-user'.

CloudFormationTerraform
OpenSearch Serverless Collection

This template creates an OpenSearch Serverless collection named 'test-collection' with the type 'SEARCH'. It also creates a matching encryption policy for the collection. The encryption policy ensures the security of the test collection. The template specifies the name, type, and description of the collection, as well as the name, type, description, and policy of the encryption policy.

CloudFormationTerraform
OpenSearch Serverless Security Configuration

This template creates a security configuration for OpenSearch Serverless. It specifies a SAML provider named 'my-provider' with a custom group attribute 'ALLGroups'. The security configuration includes SAML metadata, user attribute, group attribute, and session timeout.

CloudFormationTerraform
OpenSearch Serverless Encryption Policy

This template creates an OpenSearch Serverless encryption policy named 'logs-encryption-policy' with an AWS owned key. The policy will apply to all future collections with names that begin with 'logs'.

CloudFormationTerraform
OpenSearch Serverless Network Policy

This template creates an OpenSearch Serverless network policy named 'logs-network-policy'. It provides public access to OpenSearch endpoints and OpenSearch Dashboards endpoints. The policy will apply to all collections with names that begin with 'logs'.

CloudFormationTerraform
OpenSearch Serverless VPC Endpoint

This template creates an OpenSearch Serverless-managed interface VPC endpoint named 'test-vpcendpoint'. The endpoint is associated with one subnet and one security group.

CloudFormationTerraform
Config Rule
Amazon Elasticsearch Encrypted at Rest

A config rule that checks whether Amazon Elasticsearch Service (Amazon ES) domains have encryption at rest configuration enabled

CloudFormationTerraformAWS CLI
Amazon Elasticsearch In VPC (Not Public) Check

A config rule that checks whether whether the ElasticSearch Domains are in VPC and not as a public endpoint

CloudFormationTerraformAWS CLI
Amazon Elasticsearch Node-to-Node Encryption Enabled

A Config rule that checks that Amazon ElasticSearch Service nodes are encrypted end to end. The rule is NON_COMPLIANT if the node-to-node encryption is disabled on the domain.

CloudFormationTerraformAWS CLI
Check if OpenSearch Service domains send logs to CloudWatch Logs

Checks if Amazon OpenSearch Service domains are configured to send logs to Amazon CloudWatch Logs. The rule is COMPLIANT if a log is enabled for an Amazon ES domain. This rule is NON_COMPLIANT if logging is not configured.

CloudFormationTerraform
OpenSearch Access Control Enabled

Checks if Amazon OpenSearch Service domains have fine-grained access control enabled. The rule is NON_COMPLIANT if AdvancedSecurityOptions is not enabled for the OpenSearch Service domain.

CloudFormationTerraform
Check if OpenSearch Service domains have audit logging enabled

Checks if Amazon OpenSearch Service domains have audit logging enabled. The rule is NON_COMPLIANT if an OpenSearch Service domain does not have audit logging enabled.

CloudFormationTerraform
OpenSearch Data Node Fault Tolerance

Checks if Amazon OpenSearch Service domains are configured with at least three data nodes and zoneAwarenessEnabled is true. The rule is NON_COMPLIANT for an OpenSearch domain if 'instanceCount' is less than 3 or 'zoneAwarenessEnabled' is set to 'false'.

CloudFormationTerraform
Check if OpenSearch domains have encryption at rest enabled

Checks if Amazon OpenSearch Service domains have encryption at rest configuration enabled. The rule is NON_COMPLIANT if the `EncryptionAtRestOptions` field is not enabled.

CloudFormationTerraform
Check if OpenSearch domains are using HTTPS

Checks whether connections to OpenSearch domains are using HTTPS. The rule is NON_COMPLIANT if the Amazon OpenSearch domain 'EnforceHTTPS' is not 'true' or is 'true' and 'TLSSecurityPolicy' is not in '`tlsPolicies`'.

CloudFormationTerraform
Check if OpenSearch Service domains are in a VPC

Checks if Amazon OpenSearch Service domains are in an Amazon Virtual Private Cloud (VPC). The rule is NON_COMPLIANT if an OpenSearch Service domain endpoint is public.

CloudFormationTerraform
Check if OpenSearch domains are configured to send logs to CloudWatch

Checks if Amazon OpenSearch Service domains are configured to send logs to Amazon CloudWatch Logs. The rule is NON_COMPLIANT if logging is not configured.

CloudFormationTerraform
OpenSearch Node to Node Encryption Check

Check if Amazon OpenSearch Service nodes are encrypted end to end. The rule is NON_COMPLIANT if the node-to-node encryption is not enabled on the domain

CloudFormationTerraform