Pet*_*eld 6 aws-cloudformation aws-api-gateway serverless-framework
我有一个无服务器项目,正在创建API网关API等.项目中的一个功能需要为API端点生成URL.
我的计划是使用serverless.yml中的资源输出获取API ID,然后创建URL并将其作为env参数传递给lambda函数.
我的问题/问题是如何将API ID作为serverless.yml中的云形成输出?
我试过了:
resources:
Outputs:
RESTApiId:
Description: The id of the API created in the API gateway
Value:
Ref: name-of-api
Run Code Online (Sandbox Code Playgroud)
但这会给出错误:
The CloudFormation template is invalid: Unresolved resource dependencies [name-of-api] in the Outputs block of the template
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1159 次 |
最近记录: |