aws-cdk-lib.aws_opensearchservice.ZoneAwarenessConfig

interface ZoneAwarenessConfig

LanguageType name
.NETAmazon.CDK.AWS.OpenSearchService.ZoneAwarenessConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsopensearchservice#ZoneAwarenessConfig
Javasoftware.amazon.awscdk.services.opensearchservice.ZoneAwarenessConfig
Pythonaws_cdk.aws_opensearchservice.ZoneAwarenessConfig
TypeScript (source)aws-cdk-lib » aws_opensearchservice » ZoneAwarenessConfig

Specifies zone awareness configuration options.

Example

const prodDomain = new Domain(this, 'Domain', {
  version: EngineVersion.OPENSEARCH_1_0,
  capacity: {
    masterNodes: 5,
    dataNodes: 20,
  },
  ebs: {
    volumeSize: 20,
  },
  zoneAwareness: {
    availabilityZoneCount: 3,
  },
  logging: {
    slowSearchLogEnabled: true,
    appLogEnabled: true,
    slowIndexLogEnabled: true,
  },
});

Properties

NameTypeDescription
availabilityZoneCount?numberIf you enabled multiple Availability Zones (AZs), the number of AZs that you want the domain to use.
enabled?booleanIndicates whether to enable zone awareness for the Amazon OpenSearch Service domain.

availabilityZoneCount?

Type: number (optional, default: 2 if zone awareness is enabled.)

If you enabled multiple Availability Zones (AZs), the number of AZs that you want the domain to use.

Valid values are 2 and 3.


enabled?

Type: boolean (optional, default: false)

Indicates whether to enable zone awareness for the Amazon OpenSearch Service domain.

When you enable zone awareness, Amazon 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] (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-multiaz.html) in the Amazon OpenSearch Service Developer Guide.