Error on using aws change-resource-record-sets to add an alias

Question:

I am trying to use aws change-resource-record-sets to add an alias. The idea is to allow access to a Cloudfront distribution via URL on our domain (e.g. mydomainname.mycompany.co.uk rather than mydomainname.cloudfront.net where mydomainname=something like d4dzc6m38sq0mk)

After working through various other JSON errors, which I solved, I am still getting a problem.

What have I got wrong?

JSON:

EDITED to clarify the HostedZoneID.

Answer:

You need to pass complete name in the NAME parameter. for your example you need to pass this:

Leave a Reply