Skip to content

HostedZone

Source: src/AWS/Route53/HostedZone.ts

A Route 53 hosted zone.

HostedZone manages the lifecycle of a public or private hosted zone, including its comment and tags. For public zones, the four authoritative name servers are exposed as nameServers.

Public Hosted Zone

const zone = yield* HostedZone("MyZone", {
name: "example.com",
comment: "Primary zone",
});
// zone.nameServers -> the 4 NS records to set at your registrar

Force Destroy

const zone = yield* HostedZone("MyZone", {
name: "example.com",
forceDestroy: true, // delete leftover records on destroy
});