Manage Amazon Batch with Step Functions
Step Functions can control certain Amazon services directly from the Amazon States Language. For more information about working with Amazon Step Functions and its integrations, see the following:
Supported Amazon Batch APIs:
How the Optimized Amazon Batch integration is different than the Amazon BatchAmazon SDK integration
The Run a Job (.sync) integration pattern is available.
Note that there are no optimizations for the Request Response or Wait for a Callback with the Task Token integration patterns.
Note
Parameters in Step Functions are expressed in PascalCase
, even when the native service API
is camelCase
.
The following includes a Task
state that submits an Amazon Batch job and waits
for it to complete.
{
"StartAt": "BATCH_JOB",
"States": {
"BATCH_JOB": {
"Type": "Task",
"Resource": "arn:aws:states:::batch:submitJob.sync",
"Parameters": {
"JobDefinition": "preprocessing",
"JobName": "PreprocessingBatchJob",
"JobQueue": "SecondaryQueue",
"Parameters.$": "$.batchjob.parameters",
"ContainerOverrides": {
"ResourceRequirements": [
{
"Type": "VCPU",
"Value": "4"
}
]
}
},
"End": true
}
}
}
For information on how to configure IAM when using Step Functions with other Amazon services, see IAM Policies for integrated services.