aws / serverless-application-model

The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
https://aws.amazon.com/serverless/sam
Apache License 2.0
9.36k stars 2.39k forks source link

[Custom Domains][M3] Make API property Domain accept a list of objects #1130

Open praneetap opened 5 years ago

praneetap commented 5 years ago

Related Issues

783

Description

Custom Domains Milestone 3 is to enable multiple domains to multiple Apis mapping. The task tracks adding multiple domains in SAM template.

  Type: AWS::Serverless::Api
  Properties:
    Domain:
    - DomainName: example.com
      Certificate: !Ref MyApiExampleDomainCertificate 
    - DomainName: another.com
      Certificate: !Ref MyApiAnotherDomainCertificate 
      EndpointConfiguration: REGIONAL # this is default, so same as not having this here

Resources - Create a 'AWS::ApiGateway::DomainName' and AWS::ApiGateway::BasePathMapping for each domain name:api mapping.

kimyu92 commented 4 years ago

Any ETA on supporting this feature?

babaMar commented 2 years ago

Any hope this will be available at some point?

I'd like to map to the same API two domains, one in a public hosted zone, and another one in a private hosted zone.

I can't use directly Route53 as it seems there's no way to retrieve the distribution alias from the CloudFormation template when using SAM