0

아래 템플릿을 사용하여 cloudformation을 사용하여 작업 정의를 만듭니다. 나는이 템플릿을 업로드 할 때 나는 오류를 얻고있다 :AWS 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}  
    } 
    } 
} 
+0

'완료'템플릿입니까? – MojoJojo

+0

예,이 템플릿을 사용하여 batchjob defiintion을 만들려고합니다. – nadish

+0

작업 정의에 대한 모든 매개 변수를 지정해야합니까? 사용하지 않고 있습니다. – nadish

답변

2

당신은 "Resources" 내부 "JobDefinition"을 넣어해야합니다. 예 :

{ 
    "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}  
     } 
    } 
    } 
} 
+0

이 작품입니다. 고맙습니다! – nadish