A JobDefinition that uses Ecs orchestration to run multiple containers.
import { MultiNodeJobDefinition } from 'aws-cdk-lib/aws-batch';Or use the module namespace:
import * as batch from 'aws-cdk-lib/aws-batch';
// batch.MultiNodeJobDefinitionConfiguration passed to the constructor as MultiNodeJobDefinitionProps.
containersOptionalMultiNodeContainer[]The containers that this multinode job will run.
Default: none
instanceTypeOptionalInstanceTypeThe instance type that this job definition will run.
Default: - optimal instance, selected by Batch
mainNodeOptionalnumberThe index of the main node in this job. The main node is responsible for orchestration.
Default: 0
propagateTagsOptionalbooleanWhether to propagate tags from the JobDefinition to the ECS task that Batch spawns.
Default: false
JobDefinitionPropsjobDefinitionNameOptionalinherited from JobDefinitionPropsstringThe 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 JobDefinitionPropsnumberThe 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 JobDefinitionPropsRetryStrategy[]Defines the retry behavior for this job.
Default: - no `RetryStrategy`
schedulingPriorityOptionalinherited from JobDefinitionPropsnumberThe 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 JobDefinitionPropsbooleanSpecifies 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 JobDefinitionPropsDurationThe 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
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-batch