AgentSkillsCN

aws-cli-route53

在使用AWS Route 53命令时——托管区域、DNS记录、健康检查、路由策略、域名注册、流量策略、查询日志。在创建或管理托管区域(公有与私有)、创建/更新/删除DNS记录、设置指向AWS资源的别名记录(ALB、CloudFront、S3)、配置故障转移的健康检查、实施路由策略(加权、基于延迟、地理位置、故障转移)、注册或转移域名、管理DNSSEC签名,或配置查询日志时使用此技能。

SKILL.md
--- frontmatter
name: aws-cli-route53
description: Use when working with AWS Route 53 commands — hosted zones, DNS records, health checks, routing policies, domain registration, traffic policies, query logging. Use this skill when creating or managing hosted zones (public and private), creating/updating/deleting DNS records, setting up alias records pointing to AWS resources (ALB, CloudFront, S3), configuring health checks for failover, implementing routing policies (weighted, latency-based, geolocation, failover), registering or transferring domain names, managing DNSSEC signing, or configuring query logging.

AWS CLI v2 — Route 53 (DNS Service)

Overview

Complete reference for aws route53 and aws route53domains subcommands in AWS CLI v2. Covers hosted zone management, DNS record operations (A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, alias), health checks, routing policies (simple, weighted, latency, failover, geolocation, multivalue), domain registration, and traffic flow.

Quick Reference — Common Workflows

Create a hosted zone

bash
aws route53 create-hosted-zone --name example.com --caller-reference $(date +%s)

Create an A record

bash
aws route53 change-resource-record-sets --hosted-zone-id Z123 \
  --change-batch '{
    "Changes":[{
      "Action":"UPSERT",
      "ResourceRecordSet":{
        "Name":"app.example.com",
        "Type":"A",
        "TTL":300,
        "ResourceRecords":[{"Value":"1.2.3.4"}]
      }
    }]
  }'

Create alias record pointing to ALB

bash
aws route53 change-resource-record-sets --hosted-zone-id Z123 \
  --change-batch '{
    "Changes":[{
      "Action":"UPSERT",
      "ResourceRecordSet":{
        "Name":"app.example.com",
        "Type":"A",
        "AliasTarget":{
          "HostedZoneId":"Z35SXDOTRQ7X7K",
          "DNSName":"my-alb-123.us-east-1.elb.amazonaws.com",
          "EvaluateTargetHealth":true
        }
      }
    }]
  }'

List records in a hosted zone

bash
aws route53 list-resource-record-sets --hosted-zone-id Z123 \
  --query 'ResourceRecordSets[].{Name:Name,Type:Type,TTL:TTL}'

Create a health check

bash
aws route53 create-health-check --caller-reference $(date +%s) \
  --health-check-config '{
    "Type":"HTTPS",
    "FullyQualifiedDomainName":"app.example.com",
    "Port":443,
    "RequestInterval":30,
    "FailureThreshold":3
  }'

Covered Command Groups

GroupCommandsCLI Service
Hosted Zonescreate, delete, get, list, update, associate/disassociate VPCaws route53
Recordschange-resource-record-sets, list-resource-record-sets, test-dns-answeraws route53
Health Checkscreate, delete, get, list, update, get-statusaws route53
Traffic Policiescreate, delete, get, list, update, create/get/list policy instancesaws route53
DNSSECenable/disable-hosted-zone-dnssec, get-dnssecaws route53
Query Loggingcreate, delete, list query logging configsaws route53
Domain Registrationregister, transfer, renew, check-availability, get/update detailsaws route53domains

Command Reference

See references/index.md for the quick reference table and global options.

GroupFileCommands
Hosted Zoneshosted-zones.mdcreate-hosted-zone, delete-hosted-zone, get-hosted-zone, list-hosted-zones, list-hosted-zones-by-name, update-hosted-zone-comment, associate-vpc-with-hosted-zone, disassociate-vpc-from-hosted-zone, list-hosted-zones-by-vpc, get-hosted-zone-count, get-hosted-zone-limit
Recordsrecords.mdchange-resource-record-sets, list-resource-record-sets, test-dns-answer, get-change
Health Checkshealth-checks.mdcreate-health-check, delete-health-check, get-health-check, list-health-checks, update-health-check, get-health-check-status, get-health-check-last-failure-reason, get-health-check-count, get-checker-ip-ranges
Traffic Policiestraffic-policies.mdcreate-traffic-policy, create-traffic-policy-version, get-traffic-policy, delete-traffic-policy, list-traffic-policies, list-traffic-policy-versions, update-traffic-policy-comment, create-traffic-policy-instance, get-traffic-policy-instance, delete-traffic-policy-instance, list-traffic-policy-instances, list-traffic-policy-instances-by-hosted-zone, list-traffic-policy-instances-by-policy, update-traffic-policy-instance, get-traffic-policy-instance-count
DNSSECdnssec.mdenable-hosted-zone-dnssec, disable-hosted-zone-dnssec, get-dnssec, create-key-signing-key, delete-key-signing-key, activate-key-signing-key, deactivate-key-signing-key
Query Loggingquery-logging.mdcreate-query-logging-config, delete-query-logging-config, get-query-logging-config, list-query-logging-configs
Reusable Delegation Setsreusable-delegation-sets.mdcreate-reusable-delegation-set, delete-reusable-delegation-set, get-reusable-delegation-set, list-reusable-delegation-sets
Domain Registrationdomain-registration.mdregister-domain, transfer-domain, renew-domain, check-domain-availability, check-domain-transferability, get-domain-detail, list-domains, update-domain-nameservers, update-domain-contact, enable-domain-auto-renew, disable-domain-auto-renew, enable-domain-transfer-lock, disable-domain-transfer-lock, get-operation-detail, list-operations, list-prices, delete-domain
Tagstags.mdchange-tags-for-resource, list-tags-for-resource, list-tags-for-resources, list-tags-for-domain, update-tags-for-domain, delete-tags-for-domain