Error Unable to setup base domain mappings for serverless custom domain

Question:

In serverless.yml, under custom, I have the following code (with dummy values here):

when I execute serverless deploy, everything goes smooth. the Api get generated properly for my function.
(Under functions i have events: http)

However after the API getting generated lambda getting deployed, I get the following error:

i do not get much info other than https://forum.serverless.com/t/error-unable-to-setup-base-domain-mappings/11395
Do not know how to include api versions in serverless if that is the solution.

Answer:

Well small things can cause big problems and are very hard to figure out at times.
I found that stage: ${self:provider:stage} was wrong, it should have been stage: ${self:provider.stage}. The colon after provider was the culprit.

Leave a Reply