I would like to experiment with attaching Inference Accelerators to an ECS task. I created the following Cloudformation template:
{
"Resources": {
"Task": {
"Type" : "AWS::ECS::TaskDefinition",
"Properties" : {
"ContainerDefinitions" : [
{
"Name": "TestAccelerated",
"Image": "xxxxxxxxxxxxx.dkr.ecr.eu-central-1.amazonaws.com/myimage",
"Essential": true,
"ResourceRequirements": [{
"Type": "InferenceAccelerator",
"Value": "eia-device-1"
}]
}
],
"Cpu" : "256",
"ExecutionRoleArn" : "arn:aws:iam::xxxxxxxxxxxxx:role/ecsTaskExecutionRole",
"Family" : "TestService",
"InferenceAccelerators" : [ {
"DeviceName": "eia-device-1",
"DeviceType": "eia1.medium"
} ],
"Memory" : "512",
"NetworkMode" : "awsvpc",
"RequiresCompatibilities" : [ "FARGATE" ],
"TaskRoleArn" : "arn:aws:iam::xxxxxxxxxxxxx:role/ecsTaskExecutionRole"
}
}
}
}
When I try to create the stack, cloudformation fails with the following error:
Invalid request provided: Create TaskDefinition: Unsupported field 'inferenceAccelerators'
However there are two things that seem strange to me:
- The field I used has an uppercase I, while the error mentions it with lowercase i
- The field InferenceAccelerators is supposedly a supported field according to the documentation
Is there something wrong that I'm doing, is this a bug, or for some reason Inference Accelerators are really not supported in Task Definitions ?