- Newest
- Most votes
- Most comments
Not sure if you've seen this doc page or not for the AWS CLI: Using AWS CLI Pagination
It sounds like it might be server-side pagination, so you can try these flags in your CLI command:
--no-paginate
--page-size
--max-items
--starting-token
In case it's some weird client-side pagination, try this:
--no-cli-pager
Hi,
Thanks for the idea, but it won't work for our specific use case where mosts of the records are subdomains corresponding to tenants and we have a limit of 6 DNS zone in AWS Lightsail.
Our use case is to update an existing entry (renaming, changing target...) Since an entry update require the entry id, we need to get it first (get-domain) in order to make the update.
We implemented a workaround as follow : instead of an update of an existing entry, we delete then recreate a new one with desired information
2 suggestions :
- implement the pagination for the get-domain command as for many others command
- allow to get entries by name (probably should return an array, since many entries could share the same name) with a command like "get-domain-entry" or filters to "get-domain". With that, we won't need to get all existing entries of a DNS Zone and loop on the result set if we are interested only in a single or a few entries
Glad you found a workaround. Your use-case and suggestions have been noted. Thank you.
This is a known current limitation. Thank you for reporting it.
For an experience without this limitation, you could split your DNS zones into delegated sub-domains each with no more than 305 entries like :
- DNS zone 1 ->
example.com
has NS records for DNS zonesabc.example.com
anddef.example.com
- DNS zone 2 ->
abc.example.com
and records related to this subdomain - DNS zone 3 ->
def.example.com
and records related to this subdomain
Or use Route 53 hosted-zones with your Lightsail resources.
Or else if the partial view works for you, continue using Lightsail DNS zones with more entries.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Hi,
I have seen that.
While they work for other commands, all those options don't help for the specific "aws lightsail get-domain" : --max-items and --page-size return errors : "Unknown options: --max-items", "Unknown options: --page-size" --no-paginate is without effect --starting-token cannot be used because no token is provide in results --no-cli-pager is woking, but the result is still limited to a maximum of 311 entries. So if I have more than that, I can't get them.
This is why I think it may be a bug.
To reproduce, create dummy entries like for index = 1 to 320 : aws lightsail create-domain-entry --region us-east-1 --domain-name example.com --domain-entry name=subdom-[index].example.com,type=CNAME,target=example.com endfor
aws lightsail get-domain --domain-name example.com --region us-east-1 >domainentries.txt
We have only 311 entries in the domainentries.txt file. We have the same limitation in the lightsail web console listing. But we can confirm that more than 311 entries exists by successfully deleting the created entries or by trying to recreate non visible entries (we get an error for existing entry)