Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

346
Visualizações
Error Unable to setup base domain mappings for serverless custom domain

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

customDomain:
    domainName: myhost.mydomain.com
    basePath: ''
    stage: ${self:provider:stage}
    createRouteS3Record: true
    endpointType: 'edge'
    securityPolicy: tls_1_2
    certificateArn: 'arn:aws:acm:.................'
    hostZoneId: 'P4OCK4S1PSTZK' 

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:

Error: Error: Unable to setup base domain mappings for myhost.mydomain.com

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.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

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.

over 4 years ago · Santiago Trujillo Relatório

0

I got this error after having a domain mapping, then removing it, then trying to add it again: it looks like Serverless doesn't completely remove a domain mapping.

I had to go to Custom domain names -> my domain -> API mappings -> Configure API mappings and manually delete the domain mapping before redeploying.

over 4 years ago · Santiago Trujillo Relatório

0

Had the same issue. In my serverless.yml file in events inside functions I was having 'httpApi'. Changing it to 'http' fixed my issue

functions:
 getWebHooks:
   handler: src/path
   events:
    - httpApi:
       path: /

to

functions:
 getWebHooks:
   handler: src/path
   events:
    - http:
       path: /
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda