[英]AWS Cloudformation:Template validation error
我使用以下模板使用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}
}
}
}
您需要在"Resources"
放置"JobDefinition"
"Resources"
。 例如:
{
"Resources": {
"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}
}
}
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.