Route53

HostedZone

class HostedZone

You can add a Route53 hosted zone from an AWS account resource:

aws.add_hosted_zone(
    name="example.com",
    records=[
        {"name": "www", "type": "A", "alias": my_load_balancer},
    ],
)
name

The name of the hosted zone.

comment

A comment about the hosted zone that is shown in the AWS user interface.

records

A list of Record resources.

shared

Set this to True in the zone is not exclusively managed by this touchdown configuration. Otherwise shared zones may be unexpectedly deleted.

vpc

Set this to a Vpc in order to create a private hosted zone.

DNS records

class Record
name

For example, www. This field is required.

type

The type of DNS record. For example, A or CNAME. This field is required.

set_identifier

When using weighted recordsets this field differentiates between records for name/type pairs. It is only required in that case.

ttl

How long the DNS record is cacheable for, in seconds.

values

A list of values to return when a client resolves the given name and type.

alias

If creating an A record you can pass in one of the follwing to create an alias record. This acts like a server side CNAME. Route53 resolves the domain name and returns IP addresses directly, reducing latency.

You can pass in: