Skip to content

In Annotations Framework, is it possible to set up a custom domain for an HttpApi in your serverless.template? #1703

Open
@ashishdhingra

Description

@ashishdhingra

Discussed in #1681

Originally posted by lorenh February 26, 2024
We are used to setting up custom domains for our REST APIs in the aspnetcore webapi-style projects directly in our serverless templates using something like this (where all the !Ref's are passed in as parameters). Now I'm experimenting with the "HttpApi" and don't see the equivalent Domain settings under it as I saw under "Api"

:
Globals:
  Api:
    Domain:
      DomainName: !Ref DomainName
      CertificateArn: !Ref CertificateArn
      EndpointConfiguration: EDGE
      Route53:
        HostedZoneName: !Ref HostedZoneName

HttpApi appears to only support AccessLogSettings, Auth, StageVariables and Tags. I guess this is more of a SAM or CloudFormation question, but was hoping someone out here has figured out a way to configure it directly in your serverless template.

:
Globals:
  HttpApi:
    Domain:  <=====   ERROR
      DomainName: !Ref DomainName
      CertificateArn: !Ref CertificateArn
      EndpointConfiguration: EDGE
      Route53:
        HostedZoneName: !Ref HostedZoneName

Metadata

Metadata

Assignees

No one assigned

    Labels

    annotationsfeature-requestA feature should be added or improved.p2This is a standard priority issuequeued

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions