serverless-domain-manager
serverless-domain-manager copied to clipboard
serverless create-domain results in "unable to create domain..." no matter what domain was supplied.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Bug Report
Error Description Running the command, "serverless create-domain" results in "unable to create domain..." no matter what domain was supplied.
Command Run
sls create_domain
Console Output Error --------------------------------------------------
Error: Error: Unable to create domain api.highmynameis.com
at ServerlessCustomDomain.
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Issues: forum.serverless.com
Your Environment Information --------------------------- Operating System: darwin Node Version: 12.16.1 Framework Version: 1.71.3 Plugin Version: 3.6.12 SDK Version: 2.3.1 Components Version: 2.30.11
Domain Manager Configuration
Replace this with your own serverless.yml
file (anonymized, of course) to help us better resolve your issue.
custom:
customDomain:
domainName: api.{goDaddy domain}.com
basepath: api
createRoute53Record: false
Versions
- Node/npm version: Node 12/npm 6.14.5
- Serverless Version: v1.71.1
- Lambda Code: Javascript
having the same issue
@ChrisHarveyHub are you able to provide the output from "SLS_DEBUG=*"
?
Was struggling with this. The following seemed to work for me.
- The certificate I was using was in a different region
- Provided the
hostedZoneId
to the configuration. This ensures explicit discovery.
custom:
customDomain:
domainName: api.domain.com
basePath: api
certificateName: *.domain.com,
hostedZoneId: <hostedZoneId>
createRoute53Record: true
endpointType: regional
securityPolicy: tls_1_2
apiType: rest
@sharmashobhit i have the same issue, now m trying your fix.
I had the same issue but adding the certificateArn
explicitly worked for me.
I had the same issue I tried to fix it by migrating DNS Service From Godaddy to Route53 while allowed the server less-domain-manager to add records in the hosted zone.
echoing with https://github.com/sharmashobhit
the 2 key elements in case you generated certificates with wilcards
certificateName: "*.domain.com"
hostedZoneId: ${opt:HOSTED_ZONE_ID}
@leoalbin following your advice, certificateArn
worked for me as well. Thanks.
Using the below configuration, solved this particular issue for me:
domainName: ${self:custom.domains.${self:custom.stage}}
stage: "${self:custom.stage}"
basePath: "basePath"
certificateName: '*.yourdomain.com'
createRoute53Record: true
endpointType: 'endpointType'
securityPolicy: securityPolicy
hostedZoneId: ${opt:HOSTED_ZONE_ID}
certificateArn: 'domainCertificateArn'
customDomain: domainName: 'your domain' basePath: 'v1' stage: ${self:provider.stage} certificateName: 'your domain' createRoute53Record: true
Above configuration only helped to create the custom domain name, I think the ACM Certificate should only be created either in North Virginia (us-east-1) or North California (us-west-1). Also add 'TAG' as your 'domain name' while creating the certificate.
customDomain: domainName: 'your domain' basePath: 'v1' stage: ${self:provider.stage} certificateName: 'your domain' createRoute53Record: true
Above configuration only helped to create the custom domain name, I think the ACM Certificate should only be created either in North Virginia (us-east-1) or North California (us-west-1). Also add 'TAG' as your 'domain name' while creating the certificate.
that's not correct. for endpointType: edge the certificate needs to be issued in us-east-1 for endpointType: regional the certificate can be issued in the region (provided API gateway is supported by AWS in that) where you want to deploy your APIs
Adding the certificateArn
to custom domain and also adding region
to provider solved the issue.
customDomain: domainName: 'your domain' basePath: 'v1' stage: ${self:provider.stage} certificateName: 'your domain' createRoute53Record: true
Above configuration only helped to create the custom domain name, I think the ACM Certificate should only be created either in North Virginia (us-east-1) or North California (us-west-1). Also add 'TAG' as your 'domain name' while creating the certificate.
Hey @ashrujitpal,
No, we can create Cert. in any regions and provide the ARN and region to serverless via serverless.yaml file.
Struggled also a while with this. Note that: endpointType: regional seemed crucial in my case to solve it (except for ARN etc.)
I encountered the same issue and turn out the ACM certificate is expired. Do take a look at it.
Hi @ChrisMcHarvey
Hope you have solved that issue.
We are not supporting version 3.x anymore. Please try our latest 6.x version and let us know in case of any issues