Job definitions on Fargate
AWS Batch jobs on AWS 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: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" } runtimePlatform-
(Optional) Specifies the operating system family and CPU architecture for the job. This parameter applies to both Fargate and Amazon ECS Managed Instances job definitions. The valid value for
operatingSystemFamilyisLINUX(default). The valid values forcpuArchitectureareX86_64(default) andARM64(AWS Graviton).You select the architecture per job in the job definition, not on the compute environment. A single Fargate compute environment and job queue can run both
X86_64andARM64jobs. Fargate provisions capacity that matches each job'scpuArchitecture. Provide a container image that supports the declared architecture, or use a multi-architecture image manifest to support both. For more information, see Running mixed-architecture jobs (X86_64 and ARM64)."runtimePlatform": { "operatingSystemFamily": "LINUX", "cpuArchitecture": "ARM64" }
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 AWS Batch IAM execution role.