I have a cloudfront distribution (d123.cloudfront.com
), which I am trying to add a cname for (static.dev.mysite.com
). I have added a CNAME and TXT DNS entry as recommended on this AWS support page https://aws.amazon.com/premiumsupport/knowledge-center/resolve-cnamealreadyexists-error/
$ dig +short static.dev.mysite.com TXT
"d123.cloudfront.net"
$ dig +short static.dev.mysite.com CNAME
d123.cloudfront.net.
But when I go to add it in the AWS console by editing my distribution and filling the "Alternate Domain Names (CNAMEs)" field I get the following error
com.amazonaws.services.cloudfront.model.CNAMEAlreadyExistsException:
One or more of the CNAMEs you provided are already associated with a different resource.
(Service: AmazonCloudFront; Status Code: 409; Error Code: CNAMEAlreadyExists;
Request ID: 02cac56a-4de6-11e8-b008-0fd430b1b7c4)
This domain is not used anywhere else in AWS at the moment.