-
Notifications
You must be signed in to change notification settings - Fork 301
Description
Summary

As shown above, when entering the Driver on the AWS web console, you can see that the preview value is "Local".
However, when creating a docker volume like this, the error Run Tasks Failed Reasons : ["ATTRIBUTE"] occurs.
First, I tried to report this bug to the AWS web console, but I don't know how to report it, so I'm sorry to share it with this repository.
I wrote it down because I thought that using cli could cause similar problems.
Description
I spent a lot of time handling the Run Tasks Failed Reasons: ["ATTRIBUTE"] error.
I think we can prove that the capitalization Local is the problem through the Task Definition JSON file.
Config files
Error Case (Task Definition JSON)
{
... (ellipsis, omit) ...
"volumes": [
{
"name": "reactapp",
"dockerVolumeConfiguration": {
"scope": "task",
"driver": "Local" <<< This is the problem
}
}
],
"status": "ACTIVE",
"requiresAttributes": [
{
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
},
{
"name": "ecs.capability.execution-role-awslogs"
},
{
"name": "ecs.capability.docker-plugin.Local"
},
{
"name": "com.amazonaws.ecs.capability.ecr-auth"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
},
{
"name": "com.amazonaws.ecs.capability.task-iam-role"
},
{
"name": "ecs.capability.container-ordering"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.25"
},
{
"name": "ecs.capability.execution-role-ecr-pull"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
}
],
... (ellipsis, omit) ...
}
Normal Case (Task Definition JSON)
... (ellipsis, omit) ...
"volumes": [
{
"name": "reactapp",
"dockerVolumeConfiguration": {
"scope": "task",
"driver": "local" <<< This isn't the problem
}
}
],
"status": "ACTIVE",
"requiresAttributes": [
{
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
},
{
"name": "ecs.capability.execution-role-awslogs"
},
{
"name": "com.amazonaws.ecs.capability.ecr-auth"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
},
{
"name": "ecs.capability.docker-plugin.local"
},
{
"name": "com.amazonaws.ecs.capability.task-iam-role"
},
{
"name": "ecs.capability.container-ordering"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.25"
},
{
"name": "ecs.capability.execution-role-ecr-pull"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
}
],
... (ellipsis, omit) ...
}
If you compare the two JSON files above, you can see that the "requires Attributes" value is the same, only in different order.
However, the JSON file above had an error due to the lack of required attributes, but it was confirmed that the JSON file below works normally.
All of the above tasks were targeted at the same EC2 instance.
If it operates as cli, it is as follows.
Error Case JSON with ecs-cli
aws ecs run-task --cluster test --task-definition case:1 --launch-type="EC2"
{
"tasks": [],
"failures": [
{
"arn": "arn:aws:ecs:ap-northeast-2:97845804****:container-instance/0dd4f6bc68dd4f199fc91c49d52*****",
"reason": "ATTRIBUTE"
}
]
}
Nomal Case JSON with ecs-cli
aws ecs run-task --cluster test --task-definition case:2 --launch-type="EC2"
{
"tasks": [
{
"attachments": [],
"attributes": [
{
"name": "ecs.cpu-architecture",
"value": "x86_64"
}
],
... (ellipsis, omit) ...
"failures": []
}
Expected Behavior
Therefore, if you specify it as capitalized Local, you may experience the following problems.
Observed Behavior

Suggestions
If you look at the AWS ECS Developer Guide document, you can see that the value of the docker volume is registered in lowercase "local".

So I'd suggest changing the preview to "local" instead of "Local" in the AWS web console, or making it case-insensitive.