Create hosted zone

Create hosted zone

To create a hosted zone that will act as container for DNS records add the following entry to your stack:

// Create public hosted zone to manage DNS records of domain
PublicHostedZone.Builder.create(this, "example-hosted-zone")
    .zoneName("example.com")
    .comment("Hosted zone for domain `example.com`")
    .build();

The zoneName should match the name of the domain.