我尝试了很多方法:
aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile="$(cat config.yaml)"
和
aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile=fileb://config.yaml
但没有奏效。有什么好的方法和已知的方法可以做到这一点吗?
您当前无法以YAML格式传递参数。这是一个通常需要的功能。
一种选择是使用parameters
参数以JSON格式传递参数:
--parameters params.json
params.json:
[
{
"ParameterKey": "Foo",
"ParameterValue": "Bar"
}
]