Domain exists and doesn't exist at the same time
See original GitHub issueI’m having some trouble setting up a new domain. I’m just following the example in the docs but it doesn’t seem to work:
$ serverless create_domain
Error: Record set for my.domain already exists. my.domain was not created.
$ serverless delete_domain
Error: Record set for my.domain does not exist and cannot be deleted. my.domain was not deleted.
$ serverless create_domain
BadRequestException: The domain name you provided is already associated with an existing CloudFront distribution.
Remove the domain name from the existing CloudFront distribution or use a different domain name.
If you own this domain name and are not using it on an existing CloudFront distribution, please contact support. my.domain was not created.
$ aws cloudfront --region us-east-1 list-distributions
<nothing>
My serverless.yml
is pretty much the ‘hello world’ example, with this in the custom
section:
custom:
customDomain:
domainName: my.domain
basePath: ''
stage: ${self:provider.stage}
createRoute53Record: true
I haven’t used the domain before now so it can’t be in use. I can sls deploy
and everything seems to work:
...
Serverless Domain Manager Summary
Domain Name
my.domain
Distribution Domain Name
xxx.cloudfront.net
But I can’t connect to the domain because I get a not-found error (which is because the domain isn’t listed in Route53.)
Any ideas what’s gone wrong?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How do I check that a domain is available without triggering a ...
I use whois , nslookup and similar tools from the command line to check whether a domain is registered.
Read more >dns - Domain name existence via "dig" - Stack Overflow
In my opinion NOERROR & SERVFAIL means the hostname exists (although it doesn't mean an ip is linked to it). NXDOMAIN would mean...
Read more >Troubleshoot errors that occur when you join Windows-based ...
This article describes several common error messages that can occur when you join client computers that are running Windows to a domain.
Read more >Do intermediate subdomains need to exist? - Server Fault
TL;DR: yes intermediate subdomains need to exist, at least when queried for, per definition of the DNS; they may not exist in the...
Read more >What to do if the domain name you want is taken?
So you've come up with a great domain name...only to find out that it's already taken. Don't stress! There are many wonderful domain...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, that gives me:
I had given myself the
AmazonRoute53DomainsFullAccess
policy, but this apparently only grantsroute53:CreateHostedZone
androute53domains:*
. It looks like I needAmazonRoute53ReadOnlyAccess
to get this permission.I gave myself that policy and it looks like everything is working now. Feel free to close the issue, or let me know if you add more error handling and would like me to test it.
Many thanks for your help!
I’m having this same issue:
sls deploy
gives error:And
sls create_domain
gives:Running
aws apigateway get-domain-names
does not show the domain in the list, not even specifying the regionFinally, the log suggested in https://github.com/amplify-education/serverless-domain-manager/issues/24#issuecomment-333374588 is never reached
Any ideas? I previously run
sls create_domain
on this project and it suceeded.