Skip to content
v2.276.0

ZoneAwarenessConfig Struct ​

Specifies zone awareness configuration options.

Example ​

ts
const domain = new Domain(this, 'Domain', {
  version: EngineVersion.OPENSEARCH_1_3,
  ebs: {
    volumeSize: 10,
    volumeType: ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3,
  },
  zoneAwareness: {
    enabled: true,
    availabilityZoneCount: 3,
  },
  capacity: {
    multiAzWithStandbyEnabled: true,
    masterNodes: 3,
    dataNodes: 3,
  },
});

Properties ​

availabilityZoneCountoptionalnumberavailability_zone_countoptionalint | floatavailabilityZoneCountoptionalNumberAvailabilityZoneCountoptionaldoubleAvailabilityZoneCountoptional*float64#
If you enabled multiple Availability Zones (AZs), the number of AZs that you want the domain to use.

Default: 2 if zone awareness is enabled.

Valid values are 2 and 3.

enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool= false#
Indicates whether to enable zone awareness for the Amazon OpenSearch Service domain.
notes

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 in the Amazon OpenSearch Service Developer Guide.