amazon-cloudformation - AWS CloudFormation CLI - 参数问题
问题描述
我有一个 EC2 实例,我正在尝试使用它来执行 CFN 脚本,但我遇到了以下错误:
Error parsing parameter '--parameters': Unable to retrieve https://xxxxxxxxxxxxxxxxxxxxVPC-Parameters.json: received non 200 status code of 403
请参考我的 CLI 命令:
aws cloudformation create-stack \
--stack-name mytestVPC \
--template-url https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VPC.yaml \
--parameters https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VPC-Parameters.json \
--tags https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VPC-Tags.json \
--capabilities CAPABILITY_IAM
我之前使用 CLI 执行过 CFN,但这是我第一次遇到这样的问题。我的角色拥有对所有资源的 S3 的完全访问权限。我也验证了我的--parameters
JSON,它是有效的。
AWS CLI 版本:aws-cli/1.16.102 Python/2.7.16 Linux/4.14.171-105.231.amzn1.x86_64 botocore/1.12.92
当我从命令中删除--parameters
和--tags
时,命令成功执行。
如果有人可以帮助我理解和解决这个问题,那就太好了。
解决方案
--parameters
标志具有键/值格式,例如:
ParameterKey=string,ParameterValue=string,UsePreviousValue=boolean,ResolvedValue=string ...
你不能在那里使用 URL。对--tags
.
aws cloudformation create-stack \
--stack-name mytestVPC \
--template-url https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VPC.yaml \
--parameters ParameterKey=KeyPairName,ParameterValue=TestKey ParameterKey=SubnetID,ParameterValue=SubnetID1 \
--tags Key=MyTag,Value=MyTagValue \
--capabilities CAPABILITY_IAM
推荐阅读
- node.js - Nodejs dosent 邀请用户组(Steam)
- xcode - 如何在情节提要中裁剪照片(Xcode)
- arrays - 颤振:类型'int'不是'String'类型的子类型错误,即使数据结构对于模型是正确的
- react-native - TypeError:在 React Native 中传播不可迭代实例的尝试无效
- git - 添加提交作者姓名而不指定整个格式
- wordpress - 更改购物车中产品的总价
- java - Java 图形不会删除线条,即使我调用 super.paintComponent(g)
- c# - CurrentItem 在 iOS 上不工作,但在 Android 上工作
- r - 如何将实时进度数据传递到 Flexdashboard 中的块?
- java - 无法从其他设备访问 Spring 服务器