【发布时间】:2020-09-18 00:09:35
【问题描述】:
我正在尝试使用不同的存储库创建多个服务; actors 和 movies。这些存储库中的每一个都有自己的template.yaml
不幸的是,如果我在这两个template.yaml 中使用相同的域但不同的基本路径,我会遇到错误并且没有部署第二个服务;
在 actors 存储库中; template.yaml
Mapping:
Type: AWS::ApiGateway::BasePathMapping
Properties:
BasePath: actors
DomainName: api.example.com
RestApiId: !Ref Api
Stage: !Ref Env
Api:
Type: AWS::Serverless::Api
Properties:
# ... other props
在电影存储库中; template.yaml
Mapping:
Type: AWS::ApiGateway::BasePathMapping
Properties:
BasePath: movies
DomainName: api.example.com
RestApiId: !Ref Api
Stage: !Ref Env
Api:
Type: AWS::Serverless::Api
Properties:
# ... other props
这似乎无法完成。即使我在Apiresource definition 中移动域配置,它也表示该域正在另一个堆栈中使用,因为堆栈名称也不同。
有没有办法解决这个问题?
【问题讨论】:
标签: amazon-web-services aws-lambda aws-sam