vamsi chunduru
vamsi chunduru

Reputation: 369

How to provide Alternate Domain Names (CNAMEs) to the CloudFront distribution using CloudFormation?

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

Answers (1)

Priyanka Makhija
Priyanka Makhija

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

Related Questions