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

Only REGIONAL domain names can be managed through the API Gateway V2 API

Open BrianSHenderson opened this issue 4 years ago • 3 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

Question I am trying to use the new HTTP API Gateway but I'm struggling to add the custom domains. I am receiving the error messages: BadRequestException: Only REGIONAL domain names can be managed through the API Gateway V2 API. For EDGE domain names, please use the API Gateway V1 API. Also note that only REST APIs can be attached to EDGE domain names. when I do a sls deploy I'm having no luck getting this to work, can you help?

Domain Manager Configuration

custom:
  customDomain:
    http:
      domainName: ${self:custom.domains.${self:custom.stage}}
      basePath: ''
      stage: ${self:provider.stage}
      createRoute53Record: false
      endpointType: regional
      apiType: http
      allowPathMatching: true

Versions

  • Domain Manager version(s): 4.1.1

BrianSHenderson avatar Jun 16 '20 15:06 BrianSHenderson

If you try to create a custom domain via the console, you'll see that the newer HTTP API Gateway doesn't currently support Edge-optimized domains:

Screenshot 2020-06-27 08 38 00

stympy avatar Jun 27 '20 15:06 stympy

If you already have an edge endpoint, create a new regional one, delete the old edge and redeploy.

arliber avatar Jun 26 '21 17:06 arliber

Hello @stympy and @arliber I was advised by AWS to have a regional domain in my use case what do you advise then?

Or maybe there's a nicer work around to HTTP being blocked on custom domains?

jakubLangr avatar Mar 22 '22 20:03 jakubLangr

Hi @BrianSHenderson

Hope you have solved this issue.

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

rddimon avatar Feb 06 '23 20:02 rddimon