- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
Could you share the input file (td_graviton.json) and the version of the AWS CLI you're using?
Thanks!
Thank you Mats.
I tried with this json:
{
"runtimePlatform": {
"cpuArchitecture": "ARM64",
"operatingSystemFamily": "LINUX"
},
"containerDefinitions": [
{
"name": "containerName",
"image": "xxxxxxxxxxxxxxxxxxxxx",
"cpu": 2048,
"memory": 4096,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
},
{
"containerPort": 22,
"hostPort": 22,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "ENV",
"value": "PRE"
}
],
"mountPoints": [],
"volumesFrom": []
}
],
"family": "familyName",
"taskRoleArn": "xxxxxxxxxxxx",
"executionRoleArn": "xxxxxxxxxxxxxxxx",
"networkMode": "awsvpc",
"volumes": [],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "2048",
"memory": "4096"
}
And I tried with this too (example in documentation):
{
"family": "bb-arm64",
"networkMode": "awsvpc",
"containerDefinitions": [
{
"name": "sleep",
"image": "arm64v8/busybox",
"cpu": 100,
"memory": 100,
"essential": true,
"command": [ "echo hello" ],
"entryPoint": [ "sh", "-c" ]
}
],
"requiresCompatibilities": [ "FARGATE" ],
"cpu": "1 vCpu",
"memory": "3 GB",
"runtimePlatform": { "cpuArchitecture": "ARM64" },
"executionRoleArn": "arn:aws:iam::1234567890:role/ecsTaskExecutionRole"
}
In both cases I get the same error, it does not recognize the parameter "runtimePlatform"
My aws client version is:
#aws --version
aws-cli/2.2.46 Python/3.9.7 Darwin/19.6.0 source/x86_64 prompt/off
Thank you!!
Apologies for the delay in responding. I'm unable to repro the issue.
For reference, I'm using AWS CLI v2:
$ aws --version
aws-cli/2.4.3 Python/3.8.8 Linux/5.4.72-microsoft-standard-WSL2 exe/x86_64.ubuntu.20 prompt/off
With this, and slightly modifying the task definition you provided (specifying busybox as the container and providing a task execution role in my account), I'm able to successfully create the task definition:
{
"runtimePlatform": {
"cpuArchitecture": "ARM64",
"operatingSystemFamily": "LINUX"
},
"containerDefinitions": [
{
"name": "containerName",
"image": "arm64v8/busybox",
"cpu": 2048,
"memory": 4096,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
},
{
"containerPort": 22,
"hostPort": 22,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "ENV",
"value": "PRE"
}
],
"mountPoints": [],
"volumesFrom": []
}
],
"family": "forum-post-td-1",
"executionRoleArn": "arn:aws:iam::ACCOUNT-ID-GOES-HERE:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"volumes": [],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "2048",
"memory": "4096"
}
I had the same issue and was able to solve by updating to the latest version of the awscli here https://aws.amazon.com/cli/. Note that I had to uninstall my version installed by brew which was lagging the latest release.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 10 Monaten