我想在 SAM template.yaml 中为 API 网关设置阶段名称。但无论我尝试什么,我都没有成功。无需尝试命名我的舞台,一切都按预期进行,但使用默认的舞台名称 Prod 和 Stage。
我的 sam-cli 版本是 0.47.0
我确实在 Stackoverflow 上找到了三个类似的问题,但没有一个答案对我有用。
我总是收到这样的错误:
Unresolved resource dependencies [ServerlessRestApi] in the Outputs block of the template
Run Code Online (Sandbox Code Playgroud)
那么我如何获得一个我自己选择的艺名。如果 Prod 和 Stage 与我选择的名称共存,我不太在意。
为了完整起见,我的 template.yaml 文件如下:
Unresolved resource dependencies [ServerlessRestApi] in the Outputs block of the template
Run Code Online (Sandbox Code Playgroud)
我可能不明白这背后的预期工作流程。为什么在 API 网关指向的 lambda 函数时有 2 个阶段名称,是相同的?
我将拥有 'dev' 和 'prod' 环境,但它们将使用不同的堆栈名称,因此我永远不会混淆不同的环境。
我总是使用 deploy-dev.sh 和 …