Job definitions on Fargate
Amazon Batch jobs on Amazon Fargate don't support all of the job definition parameters that are available. Some parameters are not supported at all, and others behave differently for Fargate jobs.
The following list describes job definition parameters that are not valid or otherwise restricted in Fargate jobs.
platformCapabilities-
Must be specified as
FARGATE."platformCapabilities": [ "FARGATE" ] type-
Must be specified as
container."type": "container" - Parameters in
containerProperties -
executionRoleArn-
Must be specified for jobs running on Fargate resources. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide.
"executionRoleArn": "arn:aws-cn:iam::123456789012:role/ecsTaskExecutionRole" fargatePlatformConfiguration-
(Optional, only for Fargate job definitions). Specifies the Fargate platform version, or
LATESTfor a recent platform version. Possible values forplatformVersionare1.3.0,1.4.0, andLATEST(default)."fargatePlatformConfiguration": { "platformVersion": "1.4.0" }
instanceTypeulimits-
Not applicable for jobs running on Fargate resources.
memoryvcpus-
These settings must be specified in
resourceRequirements privileged-
Either don't specify this parameter, or specify
false."privileged": false resourceRequirements-
Both memory and vCPU requirements must be specified using supported values. GPU resources aren't supported for jobs that run on Fargate resources.
If you use GuardDuty Runtime Monitoring, there is a slight memory overhead for the GuardDuty security agent. Therefore the memory limit must include the size of the GuardDuty security agent. For information about the GuardDuty security agent memory limits, see CPU and memory limits in the GuardDuty User Guide. For information about the best practices, see How do I remediate out of memory errors on my Fargate tasks after enabling Runtime Monitoring in the Amazon ECS Developer Guide.
"resourceRequirements": [ {"type": "MEMORY", "value": "512"}, {"type": "VCPU", "value": "0.25"} ] - Parameters in
linuxParameters -
devicesmaxSwapsharedMemorySizeswappinesstmpfs-
Not applicable for jobs that run on Fargate resources.
- Parameters in
logConfiguration -
logDriver-
Only
awslogsandsplunkare supported. For more information, see Use the awslogs log driver.
- Members in
networkConfiguration -
assignPublicIp-
If the private subnet doesn't have a NAT gateway attached to send traffic to the Internet,
assignPublicIpmust be "ENABLED". For more information, see Amazon Batch IAM execution role.