【发布时间】:2018-06-22 23:25:10
【问题描述】:
我根据this CloudFormation Template 设置了一个管道。
当我尝试部署使用 AWS SAM 的模板时,管道中出现错误
动作执行失败 CreateStack 不能与包含变换的模板一起使用。 (服务:AmazonCloudFormation;状态代码:400;错误代码:ValidationError;请求 ID:167007a4-7672-11e8-8f67-67e79ae9de20)
这主要是抱怨我的动作模式,
Configuration:
ActionMode: CREATE_UPDATE
我可以使用 Pipeline Code Build stage,它使用 AWS CLI cloudformation 包 like this,
version: 0.1
phases:
install:
commands:
- npm install time
- aws cloudformation package --template-file samTemplate.yaml --s3-bucket bucket-name
--output-template-file outputSamTemplate.yaml
artifacts:
type: zip
files:
- samTemplate.yaml
- outputSamTemplate.yaml
但我宁愿使用预先构建的东西。如何使用 CodePipelines 部署无服务器转换 Cloudformation 模板?我可以不使用 AWS CLI 打包和部署模板吗?
【问题讨论】: