I have an AWS job definition as a JSON file. And, I'm using the AWS CLI command to register the definition,
aws --region us-east-2 batch register-job-definition --cli-input-json "file://jobdef.json"
This is my jobdef.json content,
{
"jobDefinitionName": "def1",
"type": "container",
"containerProperties": {
"image": "<imageArn>",
"vcpus": 4,
"memory": 14500,
"command": [],
"jobRoleArn": "arn:aws:iam::<accountid>:role/<rolename>",
"volumes": [],
"environment": [],
"mountPoints": [],
"ulimits": [
{
"hardLimit": 500000,
"name": "nofile",
"softLimit": 200000
}
],
"resourceRequirements": [],
"linuxParameters": {
"sharedMemorySize": 2000
}
}
}
When I execute the register command, it throws an error Unknown parameter in containerProperties.linuxParameters: "sharedMemorySize", must be one of: devices
The AWS document says the sharedMemorySize
parameter is a part of linuxParameters
.
The command works well without linuxParameters
.
Could someone help me in registering a job definition with a shared memory size?
By upgrading the awscli version the problem has been fixed. Previously I was using version
1.18
and now I have upgraded to2.0
.