AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

PublicHostedZone

Create a Route53 public hosted zone.

Import

import { PublicHostedZone } from 'aws-cdk-lib/aws-route53';

Or use the module namespace:

import * as route53 from 'aws-cdk-lib/aws-route53';
// route53.PublicHostedZone

Properties

Configuration passed to the constructor as PublicHostedZoneProps.

caaAmazonOptional
boolean

Whether to create a CAA record to restrict certificate authorities allowed to issue certificates for this domain to Amazon only.

Default: false

crossAccountZoneDelegationPrincipalOptionalDeprecated
IPrincipal

A principal which is trusted to assume a role for zone delegation. If supplied, this will create a Role in the same account as the Hosted Zone, which can be assumed by the `CrossAccountZoneDelegationRecord` to create a delegation record to a zone in a different account. Be sure to indicate the account(s) that you trust to create delegation records, using either `iam.AccountPrincipal` or `iam.OrganizationPrincipal`. If you are planning to use `iam.ServicePrincipal`s here, be sure to include region-specific service principals for every opt-in region you are going to be delegating to; or don't use this feature and create separate roles with appropriate permissions for every opt-in region instead.

Default: - No delegation configuration

Deprecated: Create the Role yourself and call `hostedZone.grantDelegation()`.

crossAccountZoneDelegationRoleNameOptionalDeprecated
string

The name of the role created for cross account delegation.

Default: - A role name is generated automatically

Deprecated: Create the Role yourself and call `hostedZone.grantDelegation()`.

4 properties inherited from CommonHostedZoneProps
zoneNameRequiredinherited from CommonHostedZoneProps
string

The name of the domain. For resource record types that include a domain name, specify a fully qualified domain name.

addTrailingDotOptionalinherited from CommonHostedZoneProps
boolean

Whether to add a trailing dot to the zone name.

Default: true

commentOptionalinherited from CommonHostedZoneProps
string

Any comments that you want to include about the hosted zone.

Default: none

queryLogsLogGroupArnOptionalinherited from CommonHostedZoneProps
string

The Amazon Resource Name (ARN) for the log group that you want Amazon Route 53 to send query logs to.

Default: disabled

Get the Amazon Route 53 Cheat Sheet

Everything you need to know about Amazon Route 53 on one page. HD quality, print-friendly.

Download Free Infographic