使用Serverless Framework,我正在我的模板中创建一个api网关。
functions
test:
handler: test.handler
events:
- http:
path: save-subscription
method: post
cors: false
我想用这个api地址xxxxxx.execute-api.us-east-1.amazonaws.comdevas作为我的云端源头的一个域名。
DomainName: xxxxxxx.execute-api.us-east-1.amazonaws.com
OriginPath: dev
有没有办法在api地址还没有存在之前就动态地引用它,我需要使用depend on吗?
谢谢。
- DomainName:
Fn::Join:
- ""
- - "Ref": "ApiGatewayRestApi"
- ".execute-api.${self:custom.region}.amazonaws.com"