【发布时间】:2017-11-04 06:20:44
【问题描述】:
我正在使用以下模板通过 cloudformation 创建作业定义。当我上传这个模板时,我收到了错误:
“模板验证错误:无效的模板属性或属性 [JobDefinition]”
我是否遗漏了模板中的某些内容?
{
"JobDefinition": {
"Type": "AWS::Batch::JobDefinition",
"Properties": {
"Type": "container",
"JobDefinitionName" : "filedownload",
"ContainerProperties": {
"Image": "abc",
"Vcpus": 4,
"Memory": 2000,
"JobRoleArn": "arn:aws:iam::********:role/batchjobRole",
"ReadonlyRootFilesystem": true,
"Privileged": true
},
"RetryStrategy" : {"attempts": 1}
}
}
}
【问题讨论】:
-
那是你的“完整”模板吗?
-
是的,我正在尝试使用此模板创建批处理作业定义
-
我是否必须为作业定义指定所有参数,即使我没有使用它们?
-
没有。请参阅此docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/…,了解哪些字段是必填字段。
-
@nadish 你的模板缩进正确吗?
标签: amazon-web-services templates amazon-cloudformation aws-batch