amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
939 stars 232 forks source link

Hosted Zone name matching broken in v7.3.1 #607

Closed jormaechea closed 11 months ago

jormaechea commented 11 months ago

Community Note

Bug Report

Error Description Custom domain creation fails when the hosted zone and the domain are the same.

For example, if an API has the domain api.example.com and the hosted zone is api.example.com..

The following error is thrown: Could not find hosted zone 'api.example.com'

This bug has been introduced in v7.3.1; it works OK in v7.3.0

Command Run sls create_domain

Console Output

Error: Unable to create domain '[REDACTED]':
Could not find hosted zone '[REDACTED]'
    at ServerlessCustomDomain.<anonymous> (/[REDACTED]/node_modules/serverless-domain-manager/dist/src/index.js:258:23)
    at Generator.throw (<anonymous>)
    at rejected (/[REDACTED]/node_modules/serverless-domain-manager/dist/src/index.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

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.example.com
    createRoute53Record: true

Versions

Possible Solution

Additional context/Screenshots

jormaechea commented 11 months ago

Caused by #606

jormaechea commented 11 months ago

Thanks @rddimon! 👍🏽