如何解决有没有办法在使用 aws cloudformatiohn deploy
我知道我可以使用带有 aws cloudformation create-stack
开关的 aws cloudformation update-stack
或 --template-url
来指向放置在 S3 Bucket 中的现有模板。
我想使用 aws cloudformation deploy
,这是创建和更新 CloudFormation 堆栈的相同命令,我已将模板放置在我的 S3 存储桶中。是否可以任意组合选项?
以下语法有效,但它首先将模板上传到 S3 存储桶:
aws cloudformation deploy \
--stack-name my-stack \
--template-file my-stack-template.yaml \
--s3-bucket my-bucket \
--s3-prefix templates \
--profile my-profile \
--region us-east-1
它首先将模板 my-stack-template.yaml
上传为我不想要的 1a381d4c65d9a3233450e92588a708b38.template
中的 my-bucket/templates
。我希望能够使用已经放置在 S3 存储桶中的模板通过这种方法部署堆栈,而不需要它在我的本地计算机上。
解决方法
遗憾的是没有这样的方法。不重新上传模板的唯一方法是没有要部署的更改。如果您想在 S3 中使用预先存在的模板,则必须使用 create-stack。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。