I have tried:
"Aliases": ["www.samplewebsite.com","samplewebsite.com"] 
But I am getting this error:
Property validation failure: [Encountered unsupported properties in {/DistributionConfig/Origins/0}: [Aliases]]
Ok, so the problem seems to be with the JSON object structure that you are using for creating the CloudFront distribution.
In oder to add the alternate CNAME to your Cloudfront distribution, you need to add the key "Aliases" under the "DistributionConfig" object and not under "DistributionConfig/Origins".
So basically the property "Aliases" is defined as child object of "DistributionConfig".
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With