Just curious if anyone knows how to resolve this. ...
# help
g
Just curious if anyone knows how to resolve this. Have a deployment up with a static react site, and want to add in a custom url. I have the hosted zone setup for the url I want, add the domain to the customDomain config and try to redeploy. This results in the following error:
Invalid request provided: One or more of the CNAMEs you provided are already associated with a different resource
Not sure how to fix this.
t
I think this happens when you have another cloudfront distribution already using that domain name
g
We do already use the domain, we were trying to transfer a site from heroku -> aws but its not used in any cloudfront distribution at least on our account. Could it be heroku has one setup using our domain causing this?
t
Oh interesting, I wonder if that's what's going on
It makes sense because CF needs a unique mapping since they just get raw to their servers and need to know where to route which has to be a 1:1 mapping of host header -> cf distribution
g
Hmm, I cant tell if they use cloudfront based on the request headers so any idea if its possible to query cloudfront to see if the domain is in use?
I would have to assume that probably is the case because I did the same to setup a staging site and it worked fine and we never had a custom url for staging on heroku.
t
yeah that makes sense
that's going to be an annoying migration