AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

Domain

Provides an Elasticsearch domain.

Import

import { Domain } from 'aws-cdk-lib/aws-elasticsearch';

Or use the module namespace:

import * as elasticsearch from 'aws-cdk-lib/aws-elasticsearch';
// elasticsearch.Domain

Properties

Configuration passed to the constructor as DomainProps.

versionRequiredDeprecated
ElasticsearchVersion

The Elasticsearch version that your domain will leverage.

Deprecated: use opensearchservice module instead

accessPoliciesOptionalDeprecated
PolicyStatement[]

Domain Access policies.

Default: - No access policies.

Deprecated: use opensearchservice module instead

advancedOptionsOptionalDeprecated
{ [key: string]: string }

Additional options to specify for the Amazon ES domain.

Default: - no advanced options are specified

Deprecated: use opensearchservice module instead

automatedSnapshotStartHourOptionalDeprecated
number

The hour in UTC during which the service takes an automated daily snapshot of the indices in the Amazon ES domain. Only applies for Elasticsearch versions below 5.3.

Default: - Hourly automated snapshots not used

Deprecated: use opensearchservice module instead

capacityOptionalDeprecated
CapacityConfig

The cluster capacity configuration for the Amazon ES domain.

Default: - 1 r5.large.elasticsearch data node; no dedicated master nodes.

Deprecated: use opensearchservice module instead

cognitoKibanaAuthOptionalDeprecated
CognitoOptions

Configures Amazon ES to use Amazon Cognito authentication for Kibana.

Default: - Cognito not used for authentication to Kibana.

Deprecated: use opensearchservice module instead

customEndpointOptionalDeprecated
CustomEndpointOptions

To configure a custom domain configure these options. If you specify a Route53 hosted zone it will create a CNAME record and use DNS validation for the certificate

Default: - no custom domain endpoint will be configured

Deprecated: use opensearchservice module instead

domainNameOptionalDeprecated
string

Enforces a particular physical domain name.

Default: - A name will be auto-generated.

Deprecated: use opensearchservice module instead

ebsOptionalDeprecated
EbsOptions

The configurations of Amazon Elastic Block Store (Amazon EBS) volumes that are attached to data nodes in the Amazon ES domain. For more information, see [Configuring EBS-based Storage] (https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs) in the Amazon Elasticsearch Service Developer Guide.

Default: - 10 GiB General Purpose (SSD) volumes per node.

Deprecated: use opensearchservice module instead

enableVersionUpgradeOptionalDeprecated
boolean

To upgrade an Amazon ES domain to a new version of Elasticsearch rather than replacing the entire domain resource, use the EnableVersionUpgrade update policy.

Default: - false

Deprecated: use opensearchservice module instead

encryptionAtRestOptionalDeprecated
EncryptionAtRestOptions

Encryption at rest options for the cluster.

Default: - No encryption at rest

Deprecated: use opensearchservice module instead

enforceHttpsOptionalDeprecated
boolean

True to require that all traffic to the domain arrive over HTTPS.

Default: - false

Deprecated: use opensearchservice module instead

fineGrainedAccessControlOptionalDeprecated
AdvancedSecurityOptions

Specifies options for fine-grained access control. Requires Elasticsearch version 6.7 or later. Enabling fine-grained access control also requires encryption of data at rest and node-to-node encryption, along with enforced HTTPS.

Default: - fine-grained access control is disabled

Deprecated: use opensearchservice module instead

loggingOptionalDeprecated
LoggingOptions

Configuration log publishing configuration options.

Default: - No logs are published

Deprecated: use opensearchservice module instead

nodeToNodeEncryptionOptionalDeprecated
boolean

Specify true to enable node to node encryption. Requires Elasticsearch version 6.0 or later.

Default: - Node to node encryption is not enabled.

Deprecated: use opensearchservice module instead

removalPolicyOptionalDeprecated
RemovalPolicy

Policy to apply when the domain is removed from the stack.

Default: RemovalPolicy.RETAIN

Deprecated: use opensearchservice module instead

securityGroupsOptionalDeprecated
ISecurityGroup[]

The list of security groups that are associated with the VPC endpoints for the domain. Only used if `vpc` is specified.

Default: - One new security group is created.

Deprecated: use opensearchservice module instead

tlsSecurityPolicyOptionalDeprecated
TLSSecurityPolicy

The minimum TLS version required for traffic to the domain.

Default: - TLSSecurityPolicy.TLS_1_0

Deprecated: use opensearchservice module instead

useUnsignedBasicAuthOptionalDeprecated
boolean

Configures the domain so that unsigned basic auth is enabled. If no master user is provided a default master user with username `admin` and a dynamically generated password stored in KMS is created. The password can be retrieved by getting `masterUserPassword` from the domain instance. Setting this to true will also add an access policy that allows unsigned access, enable node to node encryption, encryption at rest. If conflicting settings are encountered (like disabling encryption at rest) enabling this setting will cause a failure.

Default: - false

Deprecated: use opensearchservice module instead

vpcOptionalDeprecated
IVpc

Place the domain inside this VPC.

Default: - Domain is not placed in a VPC.

Deprecated: use opensearchservice module instead

vpcSubnetsOptionalDeprecated
SubnetSelection[]

The specific vpc subnets the domain will be placed in. You must provide one subnet for each Availability Zone that your domain uses. For example, you must specify three subnet IDs for a three Availability Zone domain. Only used if `vpc` is specified.

Default: - All private subnets.

Deprecated: use opensearchservice module instead

zoneAwarenessOptionalDeprecated
ZoneAwarenessConfig

The cluster zone awareness configuration for the Amazon ES domain.

Default: - no zone awareness (1 AZ)

Deprecated: use opensearchservice module instead

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL2 (Higher-level)
Moduleaws-elasticsearch
Properties22

Related Constructs

External Links