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 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'.

CloudFormation
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.

CloudFormation
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.

CloudFormation
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'.

CloudFormation
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'.

CloudFormation
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.

CloudFormation
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.

CloudFormation
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.

CloudFormation
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.

CloudFormation
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'.

CloudFormation
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.

CloudFormation
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`'.

CloudFormation
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.

CloudFormation
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.

CloudFormation
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

CloudFormation