Search

DNS Security

참고
HOSTED_ZONE_ID="<HOSTED_ZONE_ID>"
Shell
복사
cat << EOF > geolocation-records.json { "Changes": [ { "Action": "CREATE", "ResourceRecordSet": { "Name": "q1.p101.worldskills.site", "Type": "A", "SetIdentifier": "Internal-VPC", "GeoLocation": { "CountryCode": "US" }, "TTL": 300, "ResourceRecords": [ { "Value": "172.16.0.10" } ] } }, { "Action": "CREATE", "ResourceRecordSet": { "Name": "q1.p101.worldskills.site", "Type": "A", "SetIdentifier": "External-Default", "GeoLocation": { "CountryCode": "*" }, "TTL": 300, "ResourceRecords": [ { "Value": "54.0.0.10" } ] } } ] } EOF
Shell
복사
aws route53 change-resource-record-sets \ --hosted-zone-id $HOSTED_ZONE_ID \ --change-batch file://geolocation-records.json
Shell
복사
aws route53 list-resource-record-sets \ --hosted-zone-id $HOSTED_ZONE_ID \ --query "ResourceRecordSets[?Name == 'q1.p101.worldskills.site']"
Shell
복사