serverless-domain-manager icon indicating copy to clipboard operation
serverless-domain-manager copied to clipboard

404 on getDomainName during sls create_domain

Open pierrejoye opened this issue 5 years ago • 2 comments

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

sls create_domain fails, whether the route53 domain exists or not.

Error Description A clear and concise description of the behavior.

Command Run sls create_domain --aws-profile myprofile

Console Output

 SLS_DEBUG=* sls deploy --aws-profile myprofile
Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command upgrade
Serverless: Load command uninstall
Serverless: Load command create_domain
Serverless: Load command delete_domain
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Load command output
Serverless: Load command output:get
Serverless: Load command output:list
Serverless: Load command param
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Load command studio
Serverless: Load command dev
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: [AWS apigatewayv2 404 626.568s 7 retries] getDomainName({ DomainName: 'api.mydomain.com' })
Serverless Domain Manager: Error: api.mydomain.com:  NotFoundException: Invalid domain name identifier specified

  Type Error ---------------------------------------------

  TypeError: Cannot read property 'domainName' of undefined
      at ServerlessCustomDomain.addOutputs (/myproject/node_modules/serverless-domain-manager/dist/index.js:718:38)
      at ServerlessCustomDomain.<anonymous> (/myproject/node_modules/serverless-domain-manager/dist/index.js:118:22)
      at Generator.next (<anonymous>)
      at /myproject/node_modules/serverless-domain-manager/dist/index.js:7:71
      at new Promise (<anonymous>)
      at __awaiter (/myproject/node_modules/serverless-domain-manager/dist/index.js:3:12)
      at /myproject/node_modules/serverless-domain-manager/dist/index.js:117:60
      at Array.map (<anonymous>)
      at ServerlessCustomDomain.<anonymous> (/myproject/node_modules/serverless-domain-manager/dist/index.js:117:44)
      at Generator.next (<anonymous>)
      at fulfilled (/myproject/node_modules/serverless-domain-manager/dist/index.js:4:58)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
  From previous event:
      at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:476:22)
      at /usr/lib/node_modules/serverless/lib/classes/PluginManager.js:511:24
  From previous event:
      at PluginManager.run (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:511:8)
      at /usr/lib/node_modules/serverless/lib/Serverless.js:131:33
  From previous event:
      at Serverless.run (/usr/lib/node_modules/serverless/lib/Serverless.js:118:74)
      at /usr/lib/node_modules/serverless/bin/serverless.js:80:26
      at processImmediate (internal/timers.js:458:21)
  From previous event:
      at Object.<anonymous> (/usr/lib/node_modules/serverless/bin/serverless.js:80:4)
      at Module._compile (internal/modules/cjs/loader.js:1201:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
      at Module.load (internal/modules/cjs/loader.js:1050:32)
      at Function.Module._load (internal/modules/cjs/loader.js:938:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
      at internal/main/run_main_module.js:17:47

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              14.5.0
     Framework Version:         1.74.1
     Plugin Version:            3.6.15
     SDK Version:               2.3.1
     Components Version:        2.31.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: foo.example.tld
    basePath: bar
    createRoute53Record: true

Versions

  • npm 6.14.5
  • domain manager: 4.1.1 (where could I try 6.0 or other btw? :)
  • SLS: Framework Core: 1.74.1 Plugin: 3.6.15 SDK: 2.3.1 Components: 2.31.11
  • lambda code: python and php

Possible Solution I cannot find a solution. Domain exists in route53, certs are there and validated (using ACM). Also should I remove the domain and try again?

Additional context/Screenshots Is it related to DNS propagations? Or does it use only the AWS APIs to fetch it? It is a subdomain where the NS for this subdomain is managed by Route53, the TLD is on another DNS. Could it affect this issue?

pierrejoye avatar Jul 10 '20 01:07 pierrejoye

Also seeing this happen where it states that the cert is not found.

Error: Unable to create domain 'the-domain':
Could not find an in-date certificate for '*.the-cert'.

Since everything works fine on my other project, this really seems somehow related to the --aws-profile part of this.

Anyone know anything about this?

jordanboston avatar Jun 28 '22 22:06 jordanboston

Also seeing this happen where it states that the cert is not found.

Error: Unable to create domain 'the-domain':
Could not find an in-date certificate for '*.the-cert'.

Since everything works fine on my other project, this really seems somehow related to the --aws-profile part of this.

Anyone know anything about this?

Also having this issue, did you manage to resolve this?

kaykhan avatar Jul 15 '22 13:07 kaykhan

Hi @pierrejoye

Hope you have solved this issue.

We are not supporting version 4.x anymore please try our latest version 6.x and let us know in case of any issues

rddimon avatar Feb 06 '23 20:02 rddimon