【发布时间】:2020-07-31 05:44:07
【问题描述】:
我正在尝试创建一个脚本来自动部署/更新我的 SAM 堆栈。我正在使用批处理来执行此操作。现在我有:
call aws cloudformation deploy --template-file "serverless.yml" ^
--stack-name %1 ^
--capabilities CAPABILITY_AUTO_EXPAND CAPABILITY_IAM^
--parameter-overrides ^
StageName=%1^
{some other parameters}
--role-arn {my role arn}
其中 %1 是带有堆栈/阶段名称的批处理参数。
当我尝试运行它时,我在 cloudformation 控制台中收到错误,我需要 CAPABILITY_AUTO_EXPAND 来更新我的一些堆栈。看文档,好像 aws cloudformation deploy 不支持这个功能?并且 aws cloudformation update-stack 不接受模板的文件名。
关于如何做到这一点的任何建议?
【问题讨论】:
标签: amazon-web-services batch-file deployment amazon-cloudformation aws-cli