I am trying to create a custom domain in API Gateway as Edge-optimized and with a ACM certificate we store. But it returns the following error:
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: 5299fd33-fb58-42a1-8836-33517969365b; Proxy: null)
I checked if there were any records in the hosted zone related to or with the same name that used it but there is nothing.
On the other hand, I have also checked if there was a CNAME with the same name in my CloudFront but I don't have any distribution with CNAMEs configured. (Perhaps they are AWS's own CloudFronts).
I did a DIG against the name I want to use and this is the result:
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 60575
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;api.xxx.xxx.xx.com. IN A
;; AUTHORITY SECTION:
xxx.xxx.xx.com. 900 IN SOA ns-11X5.awsdns-16.org. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
;; Query time: 145 msec
;; SERVER: 192.168.238.254#53(192.168.238.254)
;; WHEN: Tue Sep 08 09:46:18 CEST 2020
;; MSG SIZE rcvd: 145
I'm still investigating but I can't find anything in the account related to the name I'm trying to create. What can I do?