serverless-domain-manager: Error: Unable to get BasePathMappings for domain.com
Setting the string to empty as indicated in the examples, causes the the error.
Error: Unable to get BasePathMappings for domain.com
Also, no record is created in Route53
customDomain:
domainName: dev.domain.com
basePath: ''
certificateName: '*.domain.com'
stage: ${self:provider.stage}
createRoute53Record: true
Missing something?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 17
- Comments: 28 (5 by maintainers)
you can also get this error if you do not call
sls create_domain
Make sure you run
sls create_domain
before runningsls deploy
. That did the trick for me.Yeah, I just started doing that and it seems to fix the problem.
Is that how it’s meant to work? I didn’t see anything about that in the docs.
Edit: Just re-read the docs. It’s there. 🤦♂️
I found that I had to set
endpointType
(default is ‘edge’, I needed ‘regional’) to solve this error.You should add endpointType, like this:
Then:
sls create_domain
sls deploy -v
Having the same problem! Let me know if you were able to sort it out.
Me to i had the same problem. The problem was that i used another AWS account. Be sure you use your right aws account . Verify it here: C:/Users/USER1/.aws/credentials
It’s very confusing that I had to create first the domain, and then deploy. In my opinion this should be at least logged in the output of the failing create_domain.
@captainsidd 😕 , still end up with
Error: Unable to get BasePathMappings
; simply trying to point route 53 A record alias to the cloudfront distribution.createRoute53Record: true
doesnt seem to change anything in the dns.sls create_domain
by itself yieldsError: Failed to create custom domain
Hi everyone! We rolled out better debug messages in 3.2.1 that should help identify why you’re experiencing this issue (incorrect permissions or not finding the domain as a result of not running
sls create_domain
as @rgillen stated). Let us know what’s going on!