I'm trying to register a new task-definition via CLI (also from GH Actions), my request is getting rejected because of the config for volume attachment. I'm trying to create an EBS vol from a snapshot. This works from the web console & i've copied my task-definition json from a successful existing revision.
The cli command i'm using is:
aws ecs register-task-definition --cli-input-json file://tools-testmount.json
The error I'm getting is:
Parameter validation failed: Unknown parameter in volumes[0]: "configuredAtLaunch", must be one of: name, host, dockerVolumeConfiguration, efsVolumeConfiguration, fsxWindowsFileServerVolumeConfiguration
my task def:
{
"containerDefinitions": [
{
"name": "nginx",
"image": "XXXXXXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/tools-website:latest",
"cpu": 0,
"portMappings": [
{
"name": "nginx-80-tcp",
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp",
"appProtocol": "http"
}
],
"essential": true,
"environment": [],
"environmentFiles": [],
"mountPoints": [
{
"sourceVolume": "testvol",
"containerPath": "/bindmount",
"readOnly": true
}
],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "/ecs/tools-test",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
},
"systemControls": []
}
],
"family": "tools-test",
"taskRoleArn": "arn:aws:iam::XXXXXXXXXXXX:role/ecsTaskExecutionRole",
"executionRoleArn": "arn:aws:iam::XXXXXXXXXXXX:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"volumes": [
{
"name": "testvol",
"configuredAtLaunch": true
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "512",
"memory": "1024",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
},
"tags": []
}
The service is configured for a 'Volume configured at deployment'; Amazon EBS; GP3; SnapshotID, ext4 & default encryption.
As i said, this all works when configured or updated from the console, just not the CLI or from my GH Actions pipelines, which are using aws-actions/amazon-ecs-deploy-task-definition@v1 (getting the same error).
This seems specific to the API. Any suggestions?