gpt4 book ai didi

amazon-web-services - aws Batch Jobdefinition Cloudformation 错误

转载 作者:行者123 更新时间:2023-12-03 07:19:23 24 4
gpt4 key购买 nike

我收到以下错误属性验证失败:[在 {/ContainerProperties} 中遇到不支持的属性:[环境、用户、命令]]

{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS Batch Refarch - Unmanaged ECS cluster",
"Parameters": {
"JobDefinitionName": {
"Description": "Job Definition",
"Type": "String"
},
"ContainerBootstrapCommand1": {
"Description": "Enter the Job Name",
"Type": "String",
"Default": "myjob.sh"
},
"ContainerBootstrapCommand1Timeout": {
"Description": "Choose a subnet to which this ECS cluster should be deployed",
"Type": "String",
"Default": "60"
},
"ImageContainer": {
"Description": "Enter the ARN Name for the container image",
"Type": "String",
"Default": "848282188376513.dkr.ecr.us-east-1.amazonaws.com/awsbatch/fetch_and_run"
},
"JobRole": {
"Description": "Enter the ARN Name for the container image",
"Type": "String",
"Default": "arn:aws:iam::848282188376513:role/batchJobRole"
}
},
"Resources": {
"JobDefinition": {
"Type": "AWS::Batch::JobDefinition",
"Properties": {
"Type": "container",
"JobDefinitionName": {
"Ref": "JobDefinitionName"
},
"ContainerProperties": {
"Image": {
"Ref": "ImageContainer"
},
"Vcpus": 4,
"Memory": 2000,
"command": [
{
"Ref": "ContainerBootstrapCommand1"
},
{
"Ref": "ContainerBootstrapCommand1"
}
],
"JobRoleArn": {
"Ref": "JobRole"
},
"environment": [
{
"name": "BATCH_FILE_S3_URL",
"value": "s3://mybucket/myjob.sh"
},
{
"name": "BATCH_FILE_TYPE",
"value": "script"
}
],
"ReadonlyRootFilesystem": true,
"Privileged": true,
"user": "nobody"
}
}
}
}
}

最佳答案

您的团队板中只有很小的拼写错误。

属性需要被称为Command而不是commandEnvironment而不是environment用户而不是用户

检查documentation了解更多详情

(如果您仔细阅读错误消息,您就可以自己解决此问题)

关于amazon-web-services - aws Batch Jobdefinition Cloudformation 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49642302/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com