我想在 Fargate 上使用大于默认 21GB 的存储空间在 ECS 中旋转任务。首先,我从门户创建了一个任务定义,没有ephemeralStorage
验证任务运行后,我尝试从 cli 注册一个新版本,并添加ephemeralStorage
来自https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html的参数
我的任务定义如下所示
{
"containerDefinitions": [
{
"name": "python-container",
"image": "xxxx/python-trial:v1.0",
"cpu": 0,
"portMappings": [],
"essential": true,
"environment": [],
"mountPoints": [],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/python-trial-td",
"awslogs-region": "eu-east-1",
"awslogs-stream-prefix": "ecs"
}
}
}
],
"family": "python-trial-td",
"taskRoleArn": "arn:aws:iam::xxxx:role/ecsTaskExecutionRole",
"executionRoleArn": "arn:aws:iam::xxxx:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"volumes": [],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "256",
"memory": "512",
"ephemeralStorage": {"sizeInGiB": 100 }
}
运行 aws cli
aws ecs register-task-definition --family python-trial-td --cli-input-json file://task-definition-python.json
给
Parameter validation failed:
Unknown parameter in input: "ephemeralStorage", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators
如果我通过该Configure via JSON
选项从门户尝试,我会遇到同样的
问题
语法错了吗?该参数不允许操作吗?