LinuxCommandLibrary

aws-route53

Manage Amazon Route 53 domains and records

TLDR

List all hosted zones, private and public

$ aws route53 list-hosted-zones
copy

Show all records in a zone
$ aws route53 list-resource-record-sets --hosted-zone-id [zone_id]
copy

Create a new, public zone using a request identifier to retry the operation safely
$ aws route53 create-hosted-zone --name [name] --caller-reference [request_identifier]
copy

Delete a zone (if the zone has non-defaults SOA and NS records the command will fail)
$ aws route53 delete-hosted-zone --id [zone_id]
copy

Test DNS resolving by Amazon servers of a given zone
$ aws route53 test-dns-answer --hosted-zone-id [zone_id] --record-name [name] --record-type [type]
copy

SYNOPSIS

aws route53 [global-options] subcommand [subcommand-options] [arguments]

PARAMETERS

--debug
    Turn on debug logging.

--endpoint-url TEXT
    Override default endpoint URL.

--no-verify-ssl
    Disable SSL certificate verification.

--no-paginate
    Disable automatic pagination.

--output TEXT
    Output format: json|text|table.

--query TEXT
    JMESPath query to filter output.

--profile TEXT
    Use specific profile from credentials file.

--region TEXT
    AWS region (e.g., us-east-1). Route 53 is global.

--version
    Show version and exit.

--color TEXT
    Control colored output: on|off|auto.

--no-sign-request
    Do not sign requests.

--ca-bundle TEXT
    CA bundle for SSL.

--cli-read-timeout INT
    Max CLI read timeout.

--cli-connect-timeout INT
    Max CLI connect timeout.

--cli-binary-format TEXT
    Binary format: raw-in-base64-out|base64|base32.

--no-cli-pager
    Disable cli pager.

--cli-auto-prompt
    Automatically prompt for input.

DESCRIPTION

The aws route53 command is part of the AWS Command Line Interface (CLI) for interacting with Amazon Route 53, AWS's scalable and highly available cloud DNS service.

Route 53 handles domain registration, DNS routing, health checks, and traffic management. This CLI enables programmatic management of hosted zones (DNS namespaces), resource record sets (like A, CNAME, MX records), health checks for endpoint monitoring, traffic policies for advanced routing (latency-based, geolocation, failover), query logging, and DNSSEC configurations.

Common workflows include creating hosted zones for domains, adding/changing DNS records, associating zones with VPCs, listing resources, and monitoring propagation status with get-change. It supports JSON/XML outputs, querying results with JMESPath, and pagination for large lists.

Requires AWS CLI v1 or v2 installed (pip install awscli or OS package), configured credentials (aws configure), and IAM policies like route53:*. Integrates with CloudWatch alarms and other services. Changes may take time to propagate globally due to DNS TTLs.

Ideal for automation via scripts, CI/CD, or IaC tools like Terraform. Use aws route53 help for subcommands and --help for details. (248 words)

CAVEATS

Global service but some features region-specific; requires IAM permissions; DNS changes propagate in TTL time (up to 48h); no dry-run for most ops; high quotas may need request limits increase.

COMMON SUBCOMMANDS

list-hosted-zones: List DNS zones.
create-hosted-zone: Create public/private zone.
change-resource-record-sets: Upsert/delete records.
get-health-check-status: Check endpoint health.
list-traffic-policy-instances: View policies.
Full list: aws route53 help.

SETUP EXAMPLE

aws configure set profile.default region us-east-1
aws route53 create-hosted-zone --name example.com --caller-reference 2024-01
aws route53 change-resource-record-sets --hosted-zone-id Z123 --change-batch file://changes.json

HISTORY

Introduced in AWS CLI v1.7.8 (2013) with Route 53 launch (2010). Major updates in CLI v2 (2020) for performance/modernization. Added traffic policies (2016), DNSSEC (2020), query logging (2017). Actively maintained.

SEE ALSO

aws(1), dig(1), nslookup(1), host(1), named-checkzone(8)

Copied to clipboard