So I ran into a problem where I wanted to limit access of the IAM user this script was using to a specific hosted zone, but it wants to iterate through all the available zones. Since I already know the zone ID I want, I set up an option to take a zone ID. If present, it skip listing record sets on the other zones.
Ideally, I would have avoided the ListHostedZones call altogether and just used GetHostedZone, but this was a simple change to allow what I needed without restructuring the whole lib.
So I ran into a problem where I wanted to limit access of the IAM user this script was using to a specific hosted zone, but it wants to iterate through all the available zones. Since I already know the zone ID I want, I set up an option to take a zone ID. If present, it skip listing record sets on the other zones.
Ideally, I would have avoided the
ListHostedZones
call altogether and just usedGetHostedZone
, but this was a simple change to allow what I needed without restructuring the whole lib.