Reputation: 369
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]]
Upvotes: 4
Views: 4142
Reputation: 168
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.
Upvotes: 7