Slartibartfast
Slartibartfast

Reputation: 1583

Bad starting token in AWS CLI for listing hosted zones

From within my EC2 instance, I run aws route53 list-hosted-zones and it successfully displays a list of hosted zones:

HOSTEDZONES 12345678-EEEE-7777-BBBB-ABCDEF123456    /hostedzone/Z1234567890XYZ  example.com.     9
CONFIG  Internal DNS    True
HOSTEDZONES 87654321-AAAA-9999-CCCC-ABCDEF987654    /hostedzone/Z1234567890ABC  example.org.    2
CONFIG  Staging True

But when I run the command to filter specific zones like aws route53 list-hosted-zones --starting-token Z1234567890ABC, it gives me:

Bad starting token: Z1234567890ABC

Reference: http://docs.aws.amazon.com/cli/latest/reference/route53/list-hosted-zones.html

Upvotes: 0

Views: 161

Answers (1)

Karen B
Karen B

Reputation: 2761

The --starting-token option doesn't take a zone ID. It's for pagination only. (Run aws route53 list-hosted-zones help for options.)

If you want to show the resource records for a specific zone, use aws route53 list-resource-record-sets --hosted-zone-id <ZONE ID>. If you just want to show the information for a single zone, use aws route53 get-hosted-zone --id <ZONE ID>.

Upvotes: 1

Related Questions