Unable to create domain

Hi all,

I’m trying to use the serverless-domain-manager plugin to deploy multiple services under a common API gateway and in different AWS accounts (one shared assets account, one account for each of Dev, Staging and production). The goal is to have a single API for each individual environment.

It does work from time to time even if I don’t find my current setup to be perfect. Now, I’ve been struggling with the following error message (see below) for a couple of hours on Friday so I decided to get some help from the experts :wink:

Below is the output when I launch the ‘sls create_domain’ command. I’ve looked around my multiple accounts and couldn’t find any existing domain in Route53 or in API Gateway

Any thoughts/comments are welcome

Thanks

=============

Serverless: Invoke create_domain

Error: ‘dev-services.mydomain.com’ was not created in API Gateway.
BadRequestException: The domain name you provided already exists.

For debugging logs, run again after setting the “SLS_DEBUG=*” environment variable.

Stack Trace --------------------------------------------

Error: Error: ‘dev-services.mydomain.com’ was not created in API Gateway.
BadRequestException: The domain name you provided already exists.
at createDomainName.catch (/Users/jvachon/Documents/Dev/test/node_modules/serverless-domain-manager/index.js:59:15)
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:360:22)
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:391:17)
at variables.populateService.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:99:33)
at runCallback (timers.js:566:20)
at tryOnImmediate (timers.js:546:5)
at processImmediate [as _immediateCallback] (timers.js:525:5)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:86:74)
at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:39:50)

Your Environment Information -----------------------------
OS: darwin
Node Version: 6.3.0
Serverless Version: 1.23.0

Hi all,

I tried deleting the domain and got the following:

Serverless: Invoke delete_domain

Error --------------------------------------------------

Error: ‘dev-services.mydomain.com’ was not deleted.
Error: Error: ‘dev-services.mydomain.com’ could not be found in API Gateway.
NotFoundException: Invalid domain name identifier specified

1 Like

Hi @jsvachon,

did you find out what was the problem?

I am experiencing the same issue.

Cheers
Igor

Ok, in my case the problem was “as usual” on my side. I probably ran the sls create_domain without the stage parameter and created the domain in my default environment.
After I found and deleted it - I could create a domain in the right environment without any problems.