AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

EksJobDefinition

A JobDefinition that uses Eks orchestration.

Import

import { EksJobDefinition } from 'aws-cdk-lib/aws-batch';

Or use the module namespace:

import * as batch from 'aws-cdk-lib/aws-batch';
// batch.EksJobDefinition

Properties

Configuration passed to the constructor as EksJobDefinitionProps.

containerRequired
EksContainerDefinition

The container this Job Definition will run.

dnsPolicyOptional
DnsPolicy

The DNS Policy of the pod used by this Job Definition.

Default: `DnsPolicy.CLUSTER_FIRST`

serviceAccountOptional
string

The name of the service account that's used to run the container. service accounts are Kubernetes method of identification and authentication, roughly analogous to IAM users.

Default: - the default service account of the container

useHostNetworkOptional
boolean

If specified, the Pod used by this Job Definition will use the host's network IP address. Otherwise, the Kubernetes pod networking model is enabled. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections.

Default: true

7 properties inherited from JobDefinitionProps
jobDefinitionNameOptionalinherited from JobDefinitionProps
string

The name of this job definition.

Default: - generated by CloudFormation

parametersOptionalinherited from JobDefinitionProps
{ [key: string]: any }

The default parameters passed to the container These parameters can be referenced in the `command` that you give to the container.

Default: none

retryAttemptsOptionalinherited from JobDefinitionProps
number

The number of times to retry a job. The job is retried on failure the same number of attempts as the value.

Default: 1

retryStrategiesOptionalinherited from JobDefinitionProps
RetryStrategy[]

Defines the retry behavior for this job.

Default: - no `RetryStrategy`

schedulingPriorityOptionalinherited from JobDefinitionProps
number

The priority of this Job. Only used in Fairshare Scheduling to decide which job to run first when there are multiple jobs with the same share identifier.

Default: none

skipDeregisterOnUpdateOptionalinherited from JobDefinitionProps
boolean

Specifies whether the previous revision of the job definition is retained in an active status after UPDATE events for the resource. When the property is set to false, the previous revision of the job definition is de-registered after a new revision is created. When the property is set to true, the previous revision of the job definition is not de-registered.

Default: undefined - AWS Batch default is false

timeoutOptionalinherited from JobDefinitionProps
Duration

The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, Batch terminates your jobs if they aren't finished.

Default: - no timeout

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter