Looking up A record by IP address value via Route 53 API

0

I am trying to perform a lookup on our Route 53 Hosted Zone to check if we have an IP address assigned to a particular A record.

This can be accomplished in the AWS CLI by the following command:

aws route53 list-resource-record-sets --hosted-zone-id XXXXXXXXXXXX --query "ResourceRecordSets[?ResourceRecords[?Value == 'XXX.XXX.XXX.XXX']]"

However I cannot seem to duplicate this behaviour via the API using the ListResourceRecordSetsCommand. We have a few hundred A records to filter through and I don't want to have to make multiple calls to the API for multiple pages of records that I then have to concatenate and map over just to find one specific IP.

Surely there's some way to include a Value parameter on a ListResourceRecordSetsCommand specifying the IP address as the value of the record we're searching for?

I've considered using dig and other network tools, but the reverse lookup resolves to a public EC2 instance name, not the A record name in our Hosted Zone.

Would appreciate some suggestions here thanks.

질문됨 2년 전2093회 조회
1개 답변
0
수락된 답변

Since time is a critical issue for us, I've just gone with the recursive mapping and multiple truncated Route 53 API calls via multiple ListResourceRecordSetsCommand calls. This isn't ideal and I'd still like to find some way to specifically query a record in Route 53 by its value via the API.

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠