

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# Amazon OpenSearch Service legacy Elasticsearch
<a name="AWS_Elasticsearch"></a>

**Resource types**
+ [AWS::Elasticsearch::Domain](aws-resource-elasticsearch-domain.md)

# AWS::Elasticsearch::Domain
<a name="aws-resource-elasticsearch-domain"></a>

The AWS::Elasticsearch::Domain resource creates an Amazon OpenSearch Service domain.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and legacy Elasticsearch. For instructions to upgrade domains defined within CloudFormation from Elasticsearch to OpenSearch, see [Remarks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html#aws-resource-opensearchservice-domain--remarks).

## Syntax
<a name="aws-resource-elasticsearch-domain-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-elasticsearch-domain-syntax.json"></a>

```
{
  "Type" : "AWS::Elasticsearch::Domain",
  "Properties" : {
      "[AccessPolicies](#cfn-elasticsearch-domain-accesspolicies)" : Json,
      "[AdvancedOptions](#cfn-elasticsearch-domain-advancedoptions)" : {Key: Value, ...},
      "[AdvancedSecurityOptions](#cfn-elasticsearch-domain-advancedsecurityoptions)" : AdvancedSecurityOptionsInput,
      "[CognitoOptions](#cfn-elasticsearch-domain-cognitooptions)" : CognitoOptions,
      "[DomainEndpointOptions](#cfn-elasticsearch-domain-domainendpointoptions)" : DomainEndpointOptions,
      "[DomainName](#cfn-elasticsearch-domain-domainname)" : String,
      "[EBSOptions](#cfn-elasticsearch-domain-ebsoptions)" : EBSOptions,
      "[ElasticsearchClusterConfig](#cfn-elasticsearch-domain-elasticsearchclusterconfig)" : ElasticsearchClusterConfig,
      "[ElasticsearchVersion](#cfn-elasticsearch-domain-elasticsearchversion)" : String,
      "[EncryptionAtRestOptions](#cfn-elasticsearch-domain-encryptionatrestoptions)" : EncryptionAtRestOptions,
      "[LogPublishingOptions](#cfn-elasticsearch-domain-logpublishingoptions)" : {Key: Value, ...},
      "[NodeToNodeEncryptionOptions](#cfn-elasticsearch-domain-nodetonodeencryptionoptions)" : NodeToNodeEncryptionOptions,
      "[SnapshotOptions](#cfn-elasticsearch-domain-snapshotoptions)" : SnapshotOptions,
      "[Tags](#cfn-elasticsearch-domain-tags)" : [ Tag, ... ],
      "[VPCOptions](#cfn-elasticsearch-domain-vpcoptions)" : VPCOptions
    }
}
```

### YAML
<a name="aws-resource-elasticsearch-domain-syntax.yaml"></a>

```
Type: AWS::Elasticsearch::Domain
Properties:
  [AccessPolicies](#cfn-elasticsearch-domain-accesspolicies): Json
  [AdvancedOptions](#cfn-elasticsearch-domain-advancedoptions): 
    Key: Value
  [AdvancedSecurityOptions](#cfn-elasticsearch-domain-advancedsecurityoptions): 
    AdvancedSecurityOptionsInput
  [CognitoOptions](#cfn-elasticsearch-domain-cognitooptions): 
    CognitoOptions
  [DomainEndpointOptions](#cfn-elasticsearch-domain-domainendpointoptions): 
    DomainEndpointOptions
  [DomainName](#cfn-elasticsearch-domain-domainname): String
  [EBSOptions](#cfn-elasticsearch-domain-ebsoptions): 
    EBSOptions
  [ElasticsearchClusterConfig](#cfn-elasticsearch-domain-elasticsearchclusterconfig): 
    ElasticsearchClusterConfig
  [ElasticsearchVersion](#cfn-elasticsearch-domain-elasticsearchversion): String
  [EncryptionAtRestOptions](#cfn-elasticsearch-domain-encryptionatrestoptions): 
    EncryptionAtRestOptions
  [LogPublishingOptions](#cfn-elasticsearch-domain-logpublishingoptions): 
    Key: Value
  [NodeToNodeEncryptionOptions](#cfn-elasticsearch-domain-nodetonodeencryptionoptions): 
    NodeToNodeEncryptionOptions
  [SnapshotOptions](#cfn-elasticsearch-domain-snapshotoptions): 
    SnapshotOptions
  [Tags](#cfn-elasticsearch-domain-tags): 
    - Tag
  [VPCOptions](#cfn-elasticsearch-domain-vpcoptions): 
    VPCOptions
```

## Properties
<a name="aws-resource-elasticsearch-domain-properties"></a>

`AccessPolicies`  <a name="cfn-elasticsearch-domain-accesspolicies"></a>
An AWS Identity and Access Management (IAM) policy document that specifies who can access the OpenSearch Service domain and their permissions. For more information, see [Configuring access policies](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ac.html#ac-creating) in the *Amazon OpenSearch Service Developer Guid*e.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AdvancedOptions`  <a name="cfn-elasticsearch-domain-advancedoptions"></a>
Additional options to specify for the OpenSearch Service domain. For more information, see [Advanced cluster parameters](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) in the *Amazon OpenSearch Service Developer Guide*.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `[a-zA-Z0-9]+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AdvancedSecurityOptions`  <a name="cfn-elasticsearch-domain-advancedsecurityoptions"></a>
Specifies options for fine-grained access control.   
*Required*: No  
*Type*: [AdvancedSecurityOptionsInput](aws-properties-elasticsearch-domain-advancedsecurityoptionsinput.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CognitoOptions`  <a name="cfn-elasticsearch-domain-cognitooptions"></a>
Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.  
*Required*: No  
*Type*: [CognitoOptions](aws-properties-elasticsearch-domain-cognitooptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainEndpointOptions`  <a name="cfn-elasticsearch-domain-domainendpointoptions"></a>
Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.  
*Required*: No  
*Type*: [DomainEndpointOptions](aws-properties-elasticsearch-domain-domainendpointoptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainName`  <a name="cfn-elasticsearch-domain-domainname"></a>
A name for the OpenSearch Service domain. For valid values, see the [DomainName](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/configuration-api.html#configuration-api-datatypes-domainname) data type in the *Amazon OpenSearch Service Developer Guide*. If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the domain name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).  
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
*Required*: Conditional  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EBSOptions`  <a name="cfn-elasticsearch-domain-ebsoptions"></a>
The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain. For more information, see [EBS volume size limits](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/limits.html#ebsresource) in the *Amazon OpenSearch Service Developer Guide*.  
*Required*: No  
*Type*: [EBSOptions](aws-properties-elasticsearch-domain-ebsoptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ElasticsearchClusterConfig`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig"></a>
ElasticsearchClusterConfig is a property of the AWS::Elasticsearch::Domain resource that configures the cluster of an Amazon OpenSearch Service domain.  
*Required*: No  
*Type*: [ElasticsearchClusterConfig](aws-properties-elasticsearch-domain-elasticsearchclusterconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ElasticsearchVersion`  <a name="cfn-elasticsearch-domain-elasticsearchversion"></a>
The version of Elasticsearch to use, such as 2.3. If not specified, 1.5 is used as the default. For information about the versions that OpenSearch Service supports, see [Supported versions of OpenSearch and Elasticsearch](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/what-is.html#choosing-version) in the *Amazon OpenSearch Service Developer Guide*.  
If you set the [EnableVersionUpgrade](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-upgradeopensearchdomain) update policy to `true`, you can update `ElasticsearchVersion` without interruption. When `EnableVersionUpgrade` is set to `false`, or is not specified, updating `ElasticsearchVersion` results in [replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EncryptionAtRestOptions`  <a name="cfn-elasticsearch-domain-encryptionatrestoptions"></a>
Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use. See [Encryption of data at rest for Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html).  
*Required*: No  
*Type*: [EncryptionAtRestOptions](aws-properties-elasticsearch-domain-encryptionatrestoptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogPublishingOptions`  <a name="cfn-elasticsearch-domain-logpublishingoptions"></a>
An object with one or more of the following keys: `SEARCH_SLOW_LOGS`, `ES_APPLICATION_LOGS`, `INDEX_SLOW_LOGS`, `AUDIT_LOGS`, depending on the types of logs you want to publish. Each key needs a valid `LogPublishingOption` value.   
*Required*: No  
*Type*: Object of [LogPublishingOption](aws-properties-elasticsearch-domain-logpublishingoption.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NodeToNodeEncryptionOptions`  <a name="cfn-elasticsearch-domain-nodetonodeencryptionoptions"></a>
Specifies whether node-to-node encryption is enabled. See [Node-to-node encryption for Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/ntn.html).  
*Required*: No  
*Type*: [NodeToNodeEncryptionOptions](aws-properties-elasticsearch-domain-nodetonodeencryptionoptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SnapshotOptions`  <a name="cfn-elasticsearch-domain-snapshotoptions"></a>
**DEPRECATED**. The automated snapshot configuration for the OpenSearch Service domain indices.  
*Required*: No  
*Type*: [SnapshotOptions](aws-properties-elasticsearch-domain-snapshotoptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-elasticsearch-domain-tags"></a>
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Service domain.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-elasticsearch-domain-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VPCOptions`  <a name="cfn-elasticsearch-domain-vpcoptions"></a>
The virtual private cloud (VPC) configuration for the OpenSearch Service domain. For more information, see [Launching your Amazon OpenSearch Service domains within a VPC](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html) in the *Amazon OpenSearch Service Developer Guide*.  
*Required*: No  
*Type*: [VPCOptions](aws-properties-elasticsearch-domain-vpcoptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-elasticsearch-domain-return-values"></a>

### Ref
<a name="aws-resource-elasticsearch-domain-return-values-ref"></a>

When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the resource name, such as `mystack-elasticsea-abc1d2efg3h4.` For more information about using the Ref function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-elasticsearch-domain-return-values-fn--getatt"></a>

Fn::GetAtt returns a value for a specified attribute of this type. For more information, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). The following are the available attributes and sample return values.

#### 
<a name="aws-resource-elasticsearch-domain-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the domain, such as `arn:aws:es:us-west-2:123456789012:domain/mystack-elasti-1ab2cdefghij`. This returned value is the same as the one returned by `AWS::Elasticsearch::Domain.DomainArn`.

`DomainArn`  <a name="DomainArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the domain, such as `arn:aws:es:us-west-2:123456789012:domain/mystack-elasti-1ab2cdefghij`. This returned value is the same as the one returned by `AWS::Elasticsearch::Domain.Arn`.

`DomainEndpoint`  <a name="DomainEndpoint-fn::getatt"></a>
The domain-specific endpoint that's used for requests to the OpenSearch APIs, such as `search-mystack-elasti-1ab2cdefghij-ab1c2deckoyb3hofw7wpqa3cm.us-west-1.es.amazonaws.com`.

## Remarks
<a name="aws-resource-elasticsearch-domain--remarks"></a>

 *Migrating stacks from Elasticsearch to OpenSearch* 

**Important**  
You can't directly update a CloudFormation templates to use the `AWS::OpenSearchService::Domain` resource in place of `AWS::Elasticsearch::Domain`, otherwise the corresponding domain will be deleted along with all of its data.

Perform the following steps to migrate an Elasticsearch domain to an OpenSearch domain if the domain is defined within CloudFormation.

 **Step 1: Prepare your existing stack for deprecation** 

Make a copy of your original CloudFormation template, which contains the Elasticsearch domain resource, for use in step 3. Then add the following attributes to the Elasticsearch domain resource at the same level as `Type` and `Properties`. 

 `DeletionPolicy: Retain` 

 `UpdateReplacePolicy: Retain` 

These settings ensure that CloudFormation doesn't delete or modify the corresponding domain when you delete this resource from your stack. If you have other custom resources defined in the stack that aren't critically important during the short migration period, you can delete them from the template and they'll be recreated when you create the new stack.

 **Step 2: Upgrade your domain to OpenSearch** 

After you add the two policy attributes to your template, upgrade your domain to an OpenSearch version using the normal upgrade process. For instructions, see [Starting an upgrade](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/version-migration.html#starting-upgrades). Make sure to take a snapshot of your domain before upgrading it to prevent accidental loss of data.

 **Step 3: Create a new CloudFormation template** 

While you wait for the upgrade to complete, prepare your new OpenSearch template. Using the copy of your original template that you made in step 1, make the following changes:
+ Change the domain resource type from `AWS::Elasticsearch::Domain` to `AWS::OpenSearchService::Domain`.
+ Add the `DeletionPolicy` and `UpdateReplacePolicy` attributes to the resource, as you did in step 1.
+ Change `ElasticsearchVersion` to `EngineVersion` and set its value to `OpenSearch_1.0` (or whichever version of OpenSearch you want to upgrade to).
+ If your resource contains `ElasticsearchClusterConfig`, change it to `ClusterConfig`.
+ Change the suffixes of all instance types from `.elasticsearch` to `.search`.
+ If your template includes `ColdStorageOptions`, remove it, as it's not currently supported for OpenSearch resources.
+ If there are any `Fn::GetAtt` or `!GetAtt` references to your domain ARN, change them to `!GetAtt MyDomain.Arn`.
+ Comment out any resources not currently within the stack (most likely everything except `AWS::OpenSearchService::Domain`).

See the next section for examples that demonstrate the new format.

 **Step 4: Import the OpenSearch stack** 

Once your domain upgrade finishes, you can import the new stack. Within CloudFormation, choose **Create stack** and **With existing resources (import resources)**, then upload the template you created in the previous step.

CloudFormation prompts you for the name (identifier value) of the existing domain. Copy the domain name directly from the OpenSearch console. Give the stack a name that's different from the current one, then choose **Import resources**.

After the stack is created, uncomment any related resources from the stack and update it to ensure they're recreated. You can remove the `DeletionPolicy` and `UpdateReplacePolicy` attributes if you want, but they can help prevent accidental deletions in the future.

 **Step 5: Delete the Elasticsearch stack** 

Now that your new stack is created, delete the old stack which contains the legacy Elasticsearch resource.

**Important**  
Before deleting the old stack, make absolutely sure that the template contains the `DeletionPolicy: Retain` attribute.

\$1The above steps were partially derived from this [blog post](https://onecloudplease.com/blog/migrating-to-opensearch-with-cloudformation).

## Examples
<a name="aws-resource-elasticsearch-domain--examples"></a>



**Topics**
+ [Create an OpenSearch Service domain that contains two data nodes and three master nodes](#aws-resource-elasticsearch-domain--examples--Create_an_OpenSearch_Service_domain_that_contains_two_data_nodes_and_three_master_nodes)
+ [Create a domain with VPC options](#aws-resource-elasticsearch-domain--examples--Create_a_domain_with_VPC_options)

### Create an OpenSearch Service domain that contains two data nodes and three master nodes
<a name="aws-resource-elasticsearch-domain--examples--Create_an_OpenSearch_Service_domain_that_contains_two_data_nodes_and_three_master_nodes"></a>

The following example creates an OpenSearch Service domain running Elasticsearch 7.10 that contains two data nodes and three dedicated master nodes. The domain has 40 GiB of storage and enables log publishing for application logs, search slow logs, and index slow logs. The access policy permits the root user for the AWS account to make all HTTP requests to the domain, such as indexing documents or searching indices.

#### JSON
<a name="aws-resource-elasticsearch-domain--examples--Create_an_OpenSearch_Service_domain_that_contains_two_data_nodes_and_three_master_nodes--json"></a>

```
"ElasticsearchDomain": {
   "Type":"AWS::Elasticsearch::Domain",
   "Properties": {
      "DomainName": "test",
      "ElasticsearchVersion": "7.10",
      "ElasticsearchClusterConfig": {
         "DedicatedMasterEnabled": true,
         "InstanceCount": "2",
         "ZoneAwarenessEnabled": true,
         "InstanceType": "m3.medium.elasticsearch",
         "DedicatedMasterType": "m3.medium.elasticsearch",
         "DedicatedMasterCount": "3"
      },
      "EBSOptions":{
         "EBSEnabled": true,
         "Iops": "0",
         "VolumeSize": "20",
         "VolumeType": "gp2"
      },
      "AccessPolicies": {
         "Version":"2012-10-17",		 	 	 
         "Statement":[
            {
               "Effect": "Allow",
               "Principal": {
                  "AWS": "arn:aws:iam::123456789012:user/es-user"
               },
               "Action":"es:*",
               "Resource": "arn:aws:es:us-east-1:123456789012:domain/test/*"
            }
         ]
      },
      "LogPublishingOptions": {
         "ES_APPLICATION_LOGS": {
           "CloudWatchLogsLogGroupArn": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/opensearchservice/domains/es-application-logs",
           "Enabled": true
         },
         "SEARCH_SLOW_LOGS": {
           "CloudWatchLogsLogGroupArn": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/opensearchservice/domains/es-slow-logs",
           "Enabled": true
         },
         "INDEX_SLOW_LOGS": {
           "CloudWatchLogsLogGroupArn": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/opensearchservice/domains/es-index-slow-logs",
           "Enabled": true
         }
      },
      "AdvancedOptions": {
         "rest.action.multi.allow_explicit_index": true
      }
   }
}
```

#### YAML
<a name="aws-resource-elasticsearch-domain--examples--Create_an_OpenSearch_Service_domain_that_contains_two_data_nodes_and_three_master_nodes--yaml"></a>

```
ElasticsearchDomain:
  Type: AWS::Elasticsearch::Domain
  Properties:
    DomainName: 'test'
    ElasticsearchVersion: '7.10'
    ElasticsearchClusterConfig:
      DedicatedMasterEnabled: true
      InstanceCount: '2'
      ZoneAwarenessEnabled: true
      InstanceType: 'm3.medium.elasticsearch'
      DedicatedMasterType: 'm3.medium.elasticsearch'
      DedicatedMasterCount: '3'
    EBSOptions:
      EBSEnabled: true
      Iops: '0'
      VolumeSize: '20'
      VolumeType: 'gp2'
    AccessPolicies:
      Version: '2012-10-17		 	 	 '
      Statement:
        -
          Effect: 'Allow'
          Principal:
            AWS: 'arn:aws:iam::123456789012:user/es-user'
          Action: 'es:*'
          Resource: 'arn:aws:es:us-east-1:846973539254:domain/test/*'
    LogPublishingOptions:
      ES_APPLICATION_LOGS:
          CloudWatchLogsLogGroupArn: 'arn:aws:logs:us-east-1:123456789012:log-group:/aws/opensearchservice/domains/es-application-logs'
          Enabled: true
      SEARCH_SLOW_LOGS:
          CloudWatchLogsLogGroupArn: 'arn:aws:logs:us-east-1:123456789012:log-group:/aws/opensearchservice/domains/es-slow-logs'
          Enabled: true
      INDEX_SLOW_LOGS:
          CloudWatchLogsLogGroupArn: 'arn:aws:logs:us-east-1:123456789012:log-group:/aws/opensearchservice/domains/es-index-slow-logs'
          Enabled: true
    AdvancedOptions:
      rest.action.multi.allow_explicit_index: true
```

### Create a domain with VPC options
<a name="aws-resource-elasticsearch-domain--examples--Create_a_domain_with_VPC_options"></a>

The following example creates a domain with VPC options.

#### JSON
<a name="aws-resource-elasticsearch-domain--examples--Create_a_domain_with_VPC_options--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "ElasticsearchDomain resource",
  "Parameters": {
    "DomainName": {
      "Description": "User defined Elasticsearch Domain name",
      "Type": "String"
    },
    "ElasticsearchVersion": {
      "Description": "User defined Elasticsearch Version",
      "Type": "String"
    },
    "InstanceType": {
      "Type": "String"
    },
    "AvailabilityZone": {
      "Type": "String"
    },
    "CidrBlock": {
      "Type": "String"
    },
    "GroupDescription": {
      "Type": "String"
    },
    "SGName": {
      "Type": "String"
    }
  },
  "Resources": {
    "ElasticsearchDomain": {
      "Type": "AWS::Elasticsearch::Domain",
      "Properties": {
        "DomainName": {
          "Ref": "DomainName"
        },
        "ElasticsearchVersion": {
          "Ref": "ElasticsearchVersion"
        },
        "ElasticsearchClusterConfig": {
          "InstanceCount": "1",
          "InstanceType": {
            "Ref": "InstanceType"
          }
        },
        "EBSOptions": {
          "EBSEnabled": true,
          "Iops": "0",
          "VolumeSize": "10",
          "VolumeType": "standard"
        },
        "AccessPolicies": {
          "Version": "2012-10-17",		 	 	 
          "Statement": [
            {
              "Effect": "Deny",
              "Principal": {
                "AWS": "*"
              },
              "Action": "es:*",
              "Resource": "*"
            }
          ]
        },
        "AdvancedOptions": {
          "rest.action.multi.allow_explicit_index": true
        },
        "Tags": [
          {
            "Key": "foo",
            "Value": "bar"
          }
        ],
        "VPCOptions": {
          "SubnetIds": [
            {
              "Ref": "subnet"
            }
          ],
          "SecurityGroupIds": [
            {
              "Ref": "mySecurityGroup"
            }
          ]
        }
      }
    },
    "vpc": {
      "Type": "AWS::EC2::VPC",
      "Properties": {
        "CidrBlock": "10.0.0.0/16"
      }
    },
    "subnet": {
      "Type": "AWS::EC2::Subnet",
      "Properties": {
        "VpcId": {
          "Ref": "vpc"
        },
        "CidrBlock": {
          "Ref": "CidrBlock"
        },
        "AvailabilityZone": {
          "Ref": "AvailabilityZone"
        }
      }
    },
    "mySecurityGroup": {
      "Type": "AWS::EC2::SecurityGroup",
      "Properties": {
        "GroupDescription": {
          "Ref": "GroupDescription"
        },
        "VpcId": {
          "Ref": "vpc"
        },
        "GroupName": {
          "Ref": "SGName"
        },
        "SecurityGroupIngress": [
          {
            "FromPort": 443,
            "IpProtocol": "tcp",
            "ToPort": 443,
            "CidrIp": "0.0.0.0/0"
          }
        ]
      }
    }
  },
  "Outputs": {
    "DomainArn": {
      "Value": {
        "Fn::GetAtt": [
          "ElasticsearchDomain",
          "DomainArn"
        ]
      }
    },
    "DomainEndpoint": {
      "Value": {
        "Fn::GetAtt": [
          "ElasticsearchDomain",
          "DomainEndpoint"
        ]
      }
    },
    "SecurityGroupId": {
      "Value": {
        "Ref": "mySecurityGroup"
      }
    },
    "SubnetId": {
      "Value": {
        "Ref": "subnet"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-elasticsearch-domain--examples--Create_a_domain_with_VPC_options--yaml"></a>

```
AWSTemplateFormatVersion: '2010-09-09'
Description: ElasticsearchDomain resource
Parameters:
  DomainName:
    Description: User-defined Elasticsearch domain name
    Type: String
  ElasticsearchVersion:
    Description: User-defined Elasticsearch version
    Type: String
  InstanceType:
    Type: String
  AvailabilityZone:
    Type: String
  CidrBlock:
    Type: String
  GroupDescription:
    Type: String
  SGName:
    Type: String
Resources:
  ElasticsearchDomain:
    Type: 'AWS::Elasticsearch::Domain'
    Properties:
      DomainName:
        Ref: DomainName
      ElasticsearchVersion:
        Ref: ElasticsearchVersion
      ElasticsearchClusterConfig:
        InstanceCount: '1'
        InstanceType:
          Ref: InstanceType
      EBSOptions:
        EBSEnabled: true
        Iops: '0'
        VolumeSize: '10'
        VolumeType: 'standard'
      AccessPolicies:
        Version: '2012-10-17		 	 	 '
        Statement:
          - Effect: Deny
            Principal:
              AWS: '*'
            Action: 'es:*'
            Resource: '*'
      AdvancedOptions:
        rest.action.multi.allow_explicit_index: true
      Tags:
        - Key: foo
          Value: bar
      VPCOptions:
        SubnetIds:
          - Ref: subnet
        SecurityGroupIds:
          - Ref: mySecurityGroup
  vpc:
    Type: 'AWS::EC2::VPC'
    Properties:
      CidrBlock: 10.0.0.0/16
  subnet:
    Type: 'AWS::EC2::Subnet'
    Properties:
      VpcId:
        Ref: vpc
      CidrBlock:
        Ref: CidrBlock
      AvailabilityZone:
        Ref: AvailabilityZone
  mySecurityGroup:
    Type: 'AWS::EC2::SecurityGroup'
    Properties:
      GroupDescription:
        Ref: GroupDescription
      VpcId:
        Ref: vpc
      GroupName:
        Ref: SGName
      SecurityGroupIngress:
        - FromPort: 443
          IpProtocol: tcp
          ToPort: 443
          CidrIp: 0.0.0.0/0
Outputs:
  DomainArn:
    Value:
      'Fn::GetAtt':
        - ElasticsearchDomain
        - DomainArn
  DomainEndpoint:
    Value:
      'Fn::GetAtt':
        - ElasticsearchDomain
        - DomainEndpoint
  SecurityGroupId:
    Value:
      Ref: mySecurityGroup
  SubnetId:
    Value:
      Ref: subnet
```

# AWS::Elasticsearch::Domain AdvancedSecurityOptionsInput
<a name="aws-properties-elasticsearch-domain-advancedsecurityoptionsinput"></a>

Specifies options for fine-grained access control.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-advancedsecurityoptionsinput-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-advancedsecurityoptionsinput-syntax.json"></a>

```
{
  "[AnonymousAuthEnabled](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-anonymousauthenabled)" : Boolean,
  "[Enabled](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-enabled)" : Boolean,
  "[InternalUserDatabaseEnabled](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-internaluserdatabaseenabled)" : Boolean,
  "[MasterUserOptions](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-masteruseroptions)" : MasterUserOptions
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-advancedsecurityoptionsinput-syntax.yaml"></a>

```
  [AnonymousAuthEnabled](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-anonymousauthenabled): Boolean
  [Enabled](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-enabled): Boolean
  [InternalUserDatabaseEnabled](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-internaluserdatabaseenabled): Boolean
  [MasterUserOptions](#cfn-elasticsearch-domain-advancedsecurityoptionsinput-masteruseroptions): 
    MasterUserOptions
```

## Properties
<a name="aws-properties-elasticsearch-domain-advancedsecurityoptionsinput-properties"></a>

`AnonymousAuthEnabled`  <a name="cfn-elasticsearch-domain-advancedsecurityoptionsinput-anonymousauthenabled"></a>
Property description not available.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-elasticsearch-domain-advancedsecurityoptionsinput-enabled"></a>
True to enable fine-grained access control. You must also enable encryption of data at rest and node-to-node encryption.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InternalUserDatabaseEnabled`  <a name="cfn-elasticsearch-domain-advancedsecurityoptionsinput-internaluserdatabaseenabled"></a>
True to enable the internal user database.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUserOptions`  <a name="cfn-elasticsearch-domain-advancedsecurityoptionsinput-masteruseroptions"></a>
Specifies information about the master user.  
*Required*: No  
*Type*: [MasterUserOptions](aws-properties-elasticsearch-domain-masteruseroptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain CognitoOptions
<a name="aws-properties-elasticsearch-domain-cognitooptions"></a>

Configures OpenSearch Service to use Amazon Cognito authentication for OpenSearch Dashboards.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-cognitooptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-cognitooptions-syntax.json"></a>

```
{
  "[Enabled](#cfn-elasticsearch-domain-cognitooptions-enabled)" : Boolean,
  "[IdentityPoolId](#cfn-elasticsearch-domain-cognitooptions-identitypoolid)" : String,
  "[RoleArn](#cfn-elasticsearch-domain-cognitooptions-rolearn)" : String,
  "[UserPoolId](#cfn-elasticsearch-domain-cognitooptions-userpoolid)" : String
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-cognitooptions-syntax.yaml"></a>

```
  [Enabled](#cfn-elasticsearch-domain-cognitooptions-enabled): Boolean
  [IdentityPoolId](#cfn-elasticsearch-domain-cognitooptions-identitypoolid): String
  [RoleArn](#cfn-elasticsearch-domain-cognitooptions-rolearn): String
  [UserPoolId](#cfn-elasticsearch-domain-cognitooptions-userpoolid): String
```

## Properties
<a name="aws-properties-elasticsearch-domain-cognitooptions-properties"></a>

`Enabled`  <a name="cfn-elasticsearch-domain-cognitooptions-enabled"></a>
Whether to enable or disable Amazon Cognito authentication for OpenSearch Dashboards. See [Amazon Cognito authentication for OpenSearch Dashboards](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IdentityPoolId`  <a name="cfn-elasticsearch-domain-cognitooptions-identitypoolid"></a>
The Amazon Cognito identity pool ID that you want OpenSearch Service to use for OpenSearch Dashboards authentication. Required if you enable Cognito authentication.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-elasticsearch-domain-cognitooptions-rolearn"></a>
The `AmazonESCognitoAccess` role that allows OpenSearch Service to configure your user pool and identity pool. Required if you enable Cognito authentication.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserPoolId`  <a name="cfn-elasticsearch-domain-cognitooptions-userpoolid"></a>
The Amazon Cognito user pool ID that you want OpenSearch Service to use for OpenSearch Dashboards authentication. Required if you enable Cognito authentication.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain ColdStorageOptions
<a name="aws-properties-elasticsearch-domain-coldstorageoptions"></a>

Specifies options for cold storage. For more information, see [Cold storage for Amazon Elasticsearch Service](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/cold-storage.html).

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-coldstorageoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-coldstorageoptions-syntax.json"></a>

```
{
  "[Enabled](#cfn-elasticsearch-domain-coldstorageoptions-enabled)" : Boolean
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-coldstorageoptions-syntax.yaml"></a>

```
  [Enabled](#cfn-elasticsearch-domain-coldstorageoptions-enabled): Boolean
```

## Properties
<a name="aws-properties-elasticsearch-domain-coldstorageoptions-properties"></a>

`Enabled`  <a name="cfn-elasticsearch-domain-coldstorageoptions-enabled"></a>
Whether to enable or disable cold storage on the domain. You must enable UltraWarm storage in order to enable cold storage.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain DomainEndpointOptions
<a name="aws-properties-elasticsearch-domain-domainendpointoptions"></a>

Specifies additional options for the domain endpoint, such as whether to require HTTPS for all traffic or whether to use a custom endpoint rather than the default endpoint.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-domainendpointoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-domainendpointoptions-syntax.json"></a>

```
{
  "[CustomEndpoint](#cfn-elasticsearch-domain-domainendpointoptions-customendpoint)" : String,
  "[CustomEndpointCertificateArn](#cfn-elasticsearch-domain-domainendpointoptions-customendpointcertificatearn)" : String,
  "[CustomEndpointEnabled](#cfn-elasticsearch-domain-domainendpointoptions-customendpointenabled)" : Boolean,
  "[EnforceHTTPS](#cfn-elasticsearch-domain-domainendpointoptions-enforcehttps)" : Boolean,
  "[TLSSecurityPolicy](#cfn-elasticsearch-domain-domainendpointoptions-tlssecuritypolicy)" : String
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-domainendpointoptions-syntax.yaml"></a>

```
  [CustomEndpoint](#cfn-elasticsearch-domain-domainendpointoptions-customendpoint): String
  [CustomEndpointCertificateArn](#cfn-elasticsearch-domain-domainendpointoptions-customendpointcertificatearn): String
  [CustomEndpointEnabled](#cfn-elasticsearch-domain-domainendpointoptions-customendpointenabled): Boolean
  [EnforceHTTPS](#cfn-elasticsearch-domain-domainendpointoptions-enforcehttps): Boolean
  [TLSSecurityPolicy](#cfn-elasticsearch-domain-domainendpointoptions-tlssecuritypolicy): String
```

## Properties
<a name="aws-properties-elasticsearch-domain-domainendpointoptions-properties"></a>

`CustomEndpoint`  <a name="cfn-elasticsearch-domain-domainendpointoptions-customendpoint"></a>
The fully qualified URL for your custom endpoint. Required if you enabled a custom endpoint for the domain.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CustomEndpointCertificateArn`  <a name="cfn-elasticsearch-domain-domainendpointoptions-customendpointcertificatearn"></a>
The AWS Certificate Manager ARN for your domain's SSL/TLS certificate. Required if you enabled a custom endpoint for the domain.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CustomEndpointEnabled`  <a name="cfn-elasticsearch-domain-domainendpointoptions-customendpointenabled"></a>
True to enable a custom endpoint for the domain. If enabled, you must also provide values for `CustomEndpoint` and `CustomEndpointCertificateArn`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnforceHTTPS`  <a name="cfn-elasticsearch-domain-domainendpointoptions-enforcehttps"></a>
True to require that all traffic to the domain arrive over HTTPS.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TLSSecurityPolicy`  <a name="cfn-elasticsearch-domain-domainendpointoptions-tlssecuritypolicy"></a>
The minimum TLS version required for traffic to the domain. Valid values are TLS 1.3 (recommended) or 1.2:  
+  `Policy-Min-TLS-1-0-2019-07` 
+  `Policy-Min-TLS-1-2-2019-07` 
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain EBSOptions
<a name="aws-properties-elasticsearch-domain-ebsoptions"></a>

The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the OpenSearch Service domain. For more information, see [EBS volume size limits](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/limits.html#ebsresource) in the *Amazon OpenSearch Service Developer Guide*.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-ebsoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-ebsoptions-syntax.json"></a>

```
{
  "[EBSEnabled](#cfn-elasticsearch-domain-ebsoptions-ebsenabled)" : Boolean,
  "[Iops](#cfn-elasticsearch-domain-ebsoptions-iops)" : Integer,
  "[VolumeSize](#cfn-elasticsearch-domain-ebsoptions-volumesize)" : Integer,
  "[VolumeType](#cfn-elasticsearch-domain-ebsoptions-volumetype)" : String
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-ebsoptions-syntax.yaml"></a>

```
  [EBSEnabled](#cfn-elasticsearch-domain-ebsoptions-ebsenabled): Boolean
  [Iops](#cfn-elasticsearch-domain-ebsoptions-iops): Integer
  [VolumeSize](#cfn-elasticsearch-domain-ebsoptions-volumesize): Integer
  [VolumeType](#cfn-elasticsearch-domain-ebsoptions-volumetype): String
```

## Properties
<a name="aws-properties-elasticsearch-domain-ebsoptions-properties"></a>

`EBSEnabled`  <a name="cfn-elasticsearch-domain-ebsoptions-ebsenabled"></a>
Specifies whether Amazon EBS volumes are attached to data nodes in the OpenSearch Service domain.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Iops`  <a name="cfn-elasticsearch-domain-ebsoptions-iops"></a>
The number of I/O operations per second (IOPS) that the volume supports. This property applies only to provisioned IOPS EBS volume types.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VolumeSize`  <a name="cfn-elasticsearch-domain-ebsoptions-volumesize"></a>
The size (in GiB) of the EBS volume for each data node. The minimum and maximum size of an EBS volume depends on the EBS volume type and the instance type to which it is attached. For more information, see [EBS volume size limits](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/limits.html#ebsresource) in the *Amazon OpenSearch Service Developer Guide*.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VolumeType`  <a name="cfn-elasticsearch-domain-ebsoptions-volumetype"></a>
The EBS volume type to use with the OpenSearch Service domain, such as standard, gp2, or io1. For more information about each type, see [Amazon EBS volume types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the *Amazon EC2 User Guide for Linux Instances*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain ElasticsearchClusterConfig
<a name="aws-properties-elasticsearch-domain-elasticsearchclusterconfig"></a>

The cluster configuration for the OpenSearch Service domain. You can specify options such as the instance type and the number of instances. For more information, see [Creating and managing Amazon OpenSearch Service domains](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html) in the *Amazon OpenSearch Service Developer Guide*.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-elasticsearchclusterconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-elasticsearchclusterconfig-syntax.json"></a>

```
{
  "[ColdStorageOptions](#cfn-elasticsearch-domain-elasticsearchclusterconfig-coldstorageoptions)" : ColdStorageOptions,
  "[DedicatedMasterCount](#cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmastercount)" : Integer,
  "[DedicatedMasterEnabled](#cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmasterenabled)" : Boolean,
  "[DedicatedMasterType](#cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmastertype)" : String,
  "[InstanceCount](#cfn-elasticsearch-domain-elasticsearchclusterconfig-instancecount)" : Integer,
  "[InstanceType](#cfn-elasticsearch-domain-elasticsearchclusterconfig-instancetype)" : String,
  "[WarmCount](#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmcount)" : Integer,
  "[WarmEnabled](#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmenabled)" : Boolean,
  "[WarmType](#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmtype)" : String,
  "[ZoneAwarenessConfig](#cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessconfig)" : ZoneAwarenessConfig,
  "[ZoneAwarenessEnabled](#cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessenabled)" : Boolean
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-elasticsearchclusterconfig-syntax.yaml"></a>

```
  [ColdStorageOptions](#cfn-elasticsearch-domain-elasticsearchclusterconfig-coldstorageoptions): 
    ColdStorageOptions
  [DedicatedMasterCount](#cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmastercount): Integer
  [DedicatedMasterEnabled](#cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmasterenabled): Boolean
  [DedicatedMasterType](#cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmastertype): String
  [InstanceCount](#cfn-elasticsearch-domain-elasticsearchclusterconfig-instancecount): Integer
  [InstanceType](#cfn-elasticsearch-domain-elasticsearchclusterconfig-instancetype): String
  [WarmCount](#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmcount): Integer
  [WarmEnabled](#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmenabled): Boolean
  [WarmType](#cfn-elasticsearch-domain-elasticsearchclusterconfig-warmtype): String
  [ZoneAwarenessConfig](#cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessconfig): 
    ZoneAwarenessConfig
  [ZoneAwarenessEnabled](#cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessenabled): Boolean
```

## Properties
<a name="aws-properties-elasticsearch-domain-elasticsearchclusterconfig-properties"></a>

`ColdStorageOptions`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-coldstorageoptions"></a>
Specifies cold storage options for the domain.  
*Required*: No  
*Type*: [ColdStorageOptions](aws-properties-elasticsearch-domain-coldstorageoptions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DedicatedMasterCount`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmastercount"></a>
The number of instances to use for the master node. If you specify this property, you must specify true for the DedicatedMasterEnabled property.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DedicatedMasterEnabled`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmasterenabled"></a>
Indicates whether to use a dedicated master node for the OpenSearch Service domain. A dedicated master node is a cluster node that performs cluster management tasks, but doesn't hold data or respond to data upload requests. Dedicated master nodes offload cluster management tasks to increase the stability of your search clusters. See [Dedicated master nodes in Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-dedicatedmasternodes.html).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DedicatedMasterType`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-dedicatedmastertype"></a>
The hardware configuration of the computer that hosts the dedicated master node, such as `m3.medium.elasticsearch`. If you specify this property, you must specify true for the `DedicatedMasterEnabled` property. For valid values, see [Supported instance types in Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/supported-instance-types.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InstanceCount`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-instancecount"></a>
The number of data nodes (instances) to use in the OpenSearch Service domain.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InstanceType`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-instancetype"></a>
The instance type for your data nodes, such as `m3.medium.elasticsearch`. For valid values, see [Supported instance types in Amazon OpenSearch Service ](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/supported-instance-types.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WarmCount`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-warmcount"></a>
The number of warm nodes in the cluster. Required if you enable warm storage.  
*Required*: Conditional  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WarmEnabled`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-warmenabled"></a>
Whether to enable warm storage for the cluster.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WarmType`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-warmtype"></a>
The instance type for the cluster's warm nodes. Required if you enable warm storage.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ZoneAwarenessConfig`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessconfig"></a>
Specifies zone awareness configuration options. Only use if `ZoneAwarenessEnabled` is `true`.  
*Required*: Conditional  
*Type*: [ZoneAwarenessConfig](aws-properties-elasticsearch-domain-zoneawarenessconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ZoneAwarenessEnabled`  <a name="cfn-elasticsearch-domain-elasticsearchclusterconfig-zoneawarenessenabled"></a>
Indicates whether to enable zone awareness for the OpenSearch Service domain. When you enable zone awareness, OpenSearch Service allocates the nodes and replica index shards that belong to a cluster across two Availability Zones (AZs) in the same region to prevent data loss and minimize downtime in the event of node or data center failure. Don't enable zone awareness if your cluster has no replica index shards or is a single-node cluster. For more information, see [Configuring a multi-AZ domain in Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-multiaz.html).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain EncryptionAtRestOptions
<a name="aws-properties-elasticsearch-domain-encryptionatrestoptions"></a>

Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-encryptionatrestoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-encryptionatrestoptions-syntax.json"></a>

```
{
  "[Enabled](#cfn-elasticsearch-domain-encryptionatrestoptions-enabled)" : Boolean,
  "[KmsKeyId](#cfn-elasticsearch-domain-encryptionatrestoptions-kmskeyid)" : String
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-encryptionatrestoptions-syntax.yaml"></a>

```
  [Enabled](#cfn-elasticsearch-domain-encryptionatrestoptions-enabled): Boolean
  [KmsKeyId](#cfn-elasticsearch-domain-encryptionatrestoptions-kmskeyid): String
```

## Properties
<a name="aws-properties-elasticsearch-domain-encryptionatrestoptions-properties"></a>

`Enabled`  <a name="cfn-elasticsearch-domain-encryptionatrestoptions-enabled"></a>
Specify `true` to enable encryption at rest.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyId`  <a name="cfn-elasticsearch-domain-encryptionatrestoptions-kmskeyid"></a>
The KMS key ID. Takes the form `1a2a3a4-1a2a-3a4a-5a6a-1a2a3a4a5a6a`. Required if you enable encryption at rest.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-elasticsearch-domain-encryptionatrestoptions--seealso"></a>
+ [CreateDomain](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/configuration-api.html#configuration-api-actions-createdomain) in the *Amazon OpenSearch Service Developer Guide*.



# AWS::Elasticsearch::Domain LogPublishingOption
<a name="aws-properties-elasticsearch-domain-logpublishingoption"></a>

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

Specifies whether the OpenSearch Service domain publishes the Elasticsearch application, search slow logs, or index slow logs to Amazon CloudWatch. Each option must be an object of name `SEARCH_SLOW_LOGS`, `ES_APPLICATION_LOGS`, `INDEX_SLOW_LOGS`, or `AUDIT_LOGS` depending on the type of logs you want to publish.

If you enable a slow log, you still have to enable the *collection* of slow logs using the Configuration API. To learn more, see [Enabling log publishing (AWS CLI)](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createdomain-configure-slow-logs.html#createdomain-configure-slow-logs-cli).

## Syntax
<a name="aws-properties-elasticsearch-domain-logpublishingoption-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-logpublishingoption-syntax.json"></a>

```
{
  "[CloudWatchLogsLogGroupArn](#cfn-elasticsearch-domain-logpublishingoption-cloudwatchlogsloggrouparn)" : String,
  "[Enabled](#cfn-elasticsearch-domain-logpublishingoption-enabled)" : Boolean
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-logpublishingoption-syntax.yaml"></a>

```
  [CloudWatchLogsLogGroupArn](#cfn-elasticsearch-domain-logpublishingoption-cloudwatchlogsloggrouparn): String
  [Enabled](#cfn-elasticsearch-domain-logpublishingoption-enabled): Boolean
```

## Properties
<a name="aws-properties-elasticsearch-domain-logpublishingoption-properties"></a>

`CloudWatchLogsLogGroupArn`  <a name="cfn-elasticsearch-domain-logpublishingoption-cloudwatchlogsloggrouparn"></a>
Specifies the CloudWatch log group to publish to. Required if you enable log publishing for the domain.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-elasticsearch-domain-logpublishingoption-enabled"></a>
If `true`, enables the publishing of logs to CloudWatch.  
Default: `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-elasticsearch-domain-logpublishingoption--seealso"></a>
+ [Monitoring OpenSearch logs with Amazon CloudWatch Logs](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createdomain-configure-slow-logs.html) and [LogPublishingOptions](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/configuration-api.html#configuration-api-datatypes-logpublishingoptions) in the *Amazon OpenSearch Service Developer Guide*.



# AWS::Elasticsearch::Domain MasterUserOptions
<a name="aws-properties-elasticsearch-domain-masteruseroptions"></a>

Specifies information about the master user. Required if you enabled the internal user database.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-masteruseroptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-masteruseroptions-syntax.json"></a>

```
{
  "[MasterUserARN](#cfn-elasticsearch-domain-masteruseroptions-masteruserarn)" : String,
  "[MasterUserName](#cfn-elasticsearch-domain-masteruseroptions-masterusername)" : String,
  "[MasterUserPassword](#cfn-elasticsearch-domain-masteruseroptions-masteruserpassword)" : String
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-masteruseroptions-syntax.yaml"></a>

```
  [MasterUserARN](#cfn-elasticsearch-domain-masteruseroptions-masteruserarn): String
  [MasterUserName](#cfn-elasticsearch-domain-masteruseroptions-masterusername): String
  [MasterUserPassword](#cfn-elasticsearch-domain-masteruseroptions-masteruserpassword): String
```

## Properties
<a name="aws-properties-elasticsearch-domain-masteruseroptions-properties"></a>

`MasterUserARN`  <a name="cfn-elasticsearch-domain-masteruseroptions-masteruserarn"></a>
ARN for the master user. Only specify if `InternalUserDatabaseEnabled` is false in `AdvancedSecurityOptions`.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUserName`  <a name="cfn-elasticsearch-domain-masteruseroptions-masterusername"></a>
Username for the master user. Only specify if `InternalUserDatabaseEnabled` is true in `AdvancedSecurityOptions`.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUserPassword`  <a name="cfn-elasticsearch-domain-masteruseroptions-masteruserpassword"></a>
Password for the master user. Only specify if `InternalUserDatabaseEnabled` is true in `AdvancedSecurityOptions`.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain NodeToNodeEncryptionOptions
<a name="aws-properties-elasticsearch-domain-nodetonodeencryptionoptions"></a>

Specifies whether node-to-node encryption is enabled.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-nodetonodeencryptionoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-nodetonodeencryptionoptions-syntax.json"></a>

```
{
  "[Enabled](#cfn-elasticsearch-domain-nodetonodeencryptionoptions-enabled)" : Boolean
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-nodetonodeencryptionoptions-syntax.yaml"></a>

```
  [Enabled](#cfn-elasticsearch-domain-nodetonodeencryptionoptions-enabled): Boolean
```

## Properties
<a name="aws-properties-elasticsearch-domain-nodetonodeencryptionoptions-properties"></a>

`Enabled`  <a name="cfn-elasticsearch-domain-nodetonodeencryptionoptions-enabled"></a>
Specifies whether node-to-node encryption is enabled, as a Boolean.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain SnapshotOptions
<a name="aws-properties-elasticsearch-domain-snapshotoptions"></a>

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

**DEPRECATED**. For domains running Elasticsearch 5.3 and later, OpenSearch Service takes hourly automated snapshots, making this setting irrelevant. For domains running earlier versions of Elasticsearch, OpenSearch Service takes daily automated snapshots.

The automated snapshot configuration for the OpenSearch Service domain indices.

## Syntax
<a name="aws-properties-elasticsearch-domain-snapshotoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-snapshotoptions-syntax.json"></a>

```
{
  "[AutomatedSnapshotStartHour](#cfn-elasticsearch-domain-snapshotoptions-automatedsnapshotstarthour)" : Integer
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-snapshotoptions-syntax.yaml"></a>

```
  [AutomatedSnapshotStartHour](#cfn-elasticsearch-domain-snapshotoptions-automatedsnapshotstarthour): Integer
```

## Properties
<a name="aws-properties-elasticsearch-domain-snapshotoptions-properties"></a>

`AutomatedSnapshotStartHour`  <a name="cfn-elasticsearch-domain-snapshotoptions-automatedsnapshotstarthour"></a>
The hour in UTC during which the service takes an automated daily snapshot of the indices in the OpenSearch Service domain. For example, if you specify 0, OpenSearch Service takes an automated snapshot everyday between midnight and 1 am. You can specify a value between 0 and 23.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain Tag
<a name="aws-properties-elasticsearch-domain-tag"></a>

<a name="aws-properties-elasticsearch-domain-tag-description"></a>The `Tag` property type specifies Property description not available. for an [AWS::Elasticsearch::Domain](aws-resource-elasticsearch-domain.md).

## Syntax
<a name="aws-properties-elasticsearch-domain-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-tag-syntax.json"></a>

```
{
  "[Key](#cfn-elasticsearch-domain-tag-key)" : String,
  "[Value](#cfn-elasticsearch-domain-tag-value)" : String
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-tag-syntax.yaml"></a>

```
  [Key](#cfn-elasticsearch-domain-tag-key): String
  [Value](#cfn-elasticsearch-domain-tag-value): String
```

## Properties
<a name="aws-properties-elasticsearch-domain-tag-properties"></a>

`Key`  <a name="cfn-elasticsearch-domain-tag-key"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-elasticsearch-domain-tag-value"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Elasticsearch::Domain VPCOptions
<a name="aws-properties-elasticsearch-domain-vpcoptions"></a>

The virtual private cloud (VPC) configuration for the OpenSearch Service domain. For more information, see [Launching your Amazon OpenSearch Service domains using a VPC](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html) in the *Amazon OpenSearch Service Developer Guide*.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-vpcoptions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-vpcoptions-syntax.json"></a>

```
{
  "[SecurityGroupIds](#cfn-elasticsearch-domain-vpcoptions-securitygroupids)" : [ String, ... ],
  "[SubnetIds](#cfn-elasticsearch-domain-vpcoptions-subnetids)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-vpcoptions-syntax.yaml"></a>

```
  [SecurityGroupIds](#cfn-elasticsearch-domain-vpcoptions-securitygroupids): 
    - String
  [SubnetIds](#cfn-elasticsearch-domain-vpcoptions-subnetids): 
    - String
```

## Properties
<a name="aws-properties-elasticsearch-domain-vpcoptions-properties"></a>

`SecurityGroupIds`  <a name="cfn-elasticsearch-domain-vpcoptions-securitygroupids"></a>
The list of security group IDs that are associated with the VPC endpoints for the domain. If you don't provide a security group ID, OpenSearch Service uses the default security group for the VPC. To learn more, see [Security groups for your VPC ](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) in the *Amazon VPC User Guide*.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SubnetIds`  <a name="cfn-elasticsearch-domain-vpcoptions-subnetids"></a>
Provide one subnet ID for each Availability Zone that your domain uses. For example, you must specify three subnet IDs for a three Availability Zone domain. To learn more, see [VPCs and subnets](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) in the *Amazon VPC User Guide*.  
Required if you're creating your domain inside a VPC.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-elasticsearch-domain-vpcoptions--seealso"></a>
+ [Launching your Amazon OpenSearch Service domains within a VPC](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html) in the *Amazon OpenSearch Service Developer Guide*.



# AWS::Elasticsearch::Domain ZoneAwarenessConfig
<a name="aws-properties-elasticsearch-domain-zoneawarenessconfig"></a>

Specifies zone awareness configuration options. Only use if `ZoneAwarenessEnabled` is `true`.

**Important**  
The `AWS::Elasticsearch::Domain` resource is being replaced by the [AWS::OpenSearchService::Domain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html) resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see [New resource types](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/rename.html#rename-resource) in the *Amazon OpenSearch Service Developer Guide*.

## Syntax
<a name="aws-properties-elasticsearch-domain-zoneawarenessconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-elasticsearch-domain-zoneawarenessconfig-syntax.json"></a>

```
{
  "[AvailabilityZoneCount](#cfn-elasticsearch-domain-zoneawarenessconfig-availabilityzonecount)" : Integer
}
```

### YAML
<a name="aws-properties-elasticsearch-domain-zoneawarenessconfig-syntax.yaml"></a>

```
  [AvailabilityZoneCount](#cfn-elasticsearch-domain-zoneawarenessconfig-availabilityzonecount): Integer
```

## Properties
<a name="aws-properties-elasticsearch-domain-zoneawarenessconfig-properties"></a>

`AvailabilityZoneCount`  <a name="cfn-elasticsearch-domain-zoneawarenessconfig-availabilityzonecount"></a>
If you enabled multiple Availability Zones (AZs), the number of AZs that you want the domain to use.  
Valid values are `2` and `3`. Default is 2.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)