Description:
When creating multiple AWS::Serverless::Api resources, with Domain and Route53 properties, only one gateway has a record set created when rendered to CloudFormation template from SAM.
ApiGatewayAdmin:
Type: AWS::Serverless::Api
Properties:
Name: !Join ["-", ["App", !Ref EnvironmentName, "Web"]]
StageName: !Ref EnvironmentName
TracingEnabled: true
MethodSettings:
- LoggingLevel: Info
ResourcePath: '/*'
HttpMethod: '*'
Domain:
DomainName: !Join [".", ["admin", !Ref EnvironmentName, !Ref DomainName]]
CertificateArn: !Ref Certificate
EndpointConfiguration: REGIONAL
Route53:
HostedZoneId: !Ref HostedZone
EndpointConfiguration:
Type: REGIONAL
I have three objects exactly identical as above with only changes to the DomainName to make it unique and possibly co-incidentally, the API which successfully has its record set created is the final API object in the YAML before function definitions.
Steps to reproduce:
- Create three API resources, with DomainName and Route53 configuration sharing the same hosted zone
- Render template to CloudFormation
Observed result:
CloudFormation template output only contains a single record set, in my case, the last defined API resource.
Expected result:
A record set and domain name for each API resource
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: MacOS, Linux (Alpine, Ubuntu)
sam --version: SAM CLI, version 1.2.0
Add --debug flag to command you are running
Description:
When creating multiple AWS::Serverless::Api resources, with Domain and Route53 properties, only one gateway has a record set created when rendered to CloudFormation template from SAM.
I have three objects exactly identical as above with only changes to the DomainName to make it unique and possibly co-incidentally, the API which successfully has its record set created is the final API object in the YAML before function definitions.
Steps to reproduce:
Observed result:
CloudFormation template output only contains a single record set, in my case, the last defined API resource.
Expected result:
A record set and domain name for each API resource
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version: SAM CLI, version 1.2.0Add --debug flag to command you are running