Reputation: 51
I'm getting this error message when trying to deploy a CloudFront distribution:
The parameter CNAME contains one or more parameters that are not valid. (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidArgument; Request ID: dfeb983d-b398-11e8-a2d5-5f6a8378e402)
I'm following the guide at http://templates.cloudonaut.io/en/stable/wordpress/#wordpress-fault-tolerant-and-scalable-mysql.
How can I fix this?
Upvotes: 5
Views: 13430
Reputation: 1299
Make sure you do not have a blank entry in the Alternate domain name (CNAME) - optional
section.
In other words, do not click Add Item
and leave it blank. If you do and click save, it will think the blank entry is an alternate domain and give you the error: The parameter CNAME contains one or more parameters that are too small.
Upvotes: 1
Reputation: 96
for me the CNAME just hava an extra blank space. delete the blank space and everthing is ok.
Upvotes: 3
Reputation:
I investigated this issue by attempting to manually create the CloudFront distribution in the AWS console. When I pasted in the CNAME into "Settings / Alternate domain name (CNAME) - optional", it showed me the following warning:
Alternative domain name must contain one or more dots (.) and can only include lower case alphanumeric characters, dashes (-), and, optionally, a leading "*." to indicate all subdomains of the specified domain, for example, "*.example.com".
After I conformed my domain name to those requirements (i.e., converting to lowercase), the distribution deployed cleanly.
The parameter CNAME contains one or more parameters that are not valid
is not a very helpful message — that should be improved!
Upvotes: 0
Reputation: 626
For anyone else running into this issue, I ran into this issue today, and it turned out I had a misunderstanding about the HostedZone parameter in AWS's sample CloudFormation template - I had provided the Hosted Zone ID when the parameter was expecting the actual domain of the Hosted Zone. In this question's sample template, for example, the value of '${SubDomainNameWithDot}${HostedZoneName}' would need to be a valid domain name.
Upvotes: 3