I am newbie to Amazon Services and their API.
Using Amazon route53Clinet class, I know there is a method getHostedZone which get the Hosted Zone information on the
I know this may be old but I was able to grab the ID with Powershell when initially creating the DNS zone by doing the following:
$route53Script = aws route53 create-hosted-zone --delegation-set-id /delegationset/DELIGATIONID --name domain.com --caller-reference blablabla | ConvertFrom-Json
$Route53ID = $route53Script.HostedZone.Id.replace("/hostedzone/","")
This gives me the Zone ID that I can then use as a variable to do this:
aws route53 change-resource-record-sets --hosted-zone-id $Route53ID --change-batch file://C:\default.json
I don't know if it's the best way, but it works! I believe you can do almost the same thing in PHP. It's been awhile since I've written some bigger scripts in PHP though.