Setting AWS Batch Job Properties Through Scripts
Attributes defined for an object affect how the object is processed. Script statements allow you to dynamically change those object attributes and assign new values when the task is generated. The new values are only valid for the current generation and are not permanently stored in the object.
You can define the values of any of the settings of Batch Submit Jobs using scripts. You do this by using :PUT_ATT commands on the Pre-Process object definition page.
For more information, see the Automic Automation product documentation:
The attributes available forAWS Batch Submit Jobs are the following:
-
connection
Defines the value of the AWS Batch Connection object definition.
Value: text
-
submitJobType
Defines the type of execution that you want to use.
Values: Parameters and JSON payload
When using Parameters:
-
jobQueue
Defines the job queue where the job is submitted.
Value: text
-
jobDefinition
Defines the relevant job definition.
Make sure that the definition also mentions the revision, if required. Also, make sure the job definition you want to use is active, otherwise the job will fail.
Value: text
-
jobName
Defines the job name. This is the name that you want to use to execute the job.
Value: text
It can have up to 128 characters and can contain upper and lowercase, numbers, hyphens and underscores. However, you have to make sure that the first character is alphanumeric.
-
containerOverride
Define the properties (in JSON format) that you want pass at runtime and that you want to use to override the default command for a container or to add new or override existing environment variables on a container.
Value: JSON
-
jobAttempts
Define the number of times a job should be retried (moved to the RUNNABLE status) after failing.
Values: 1 to 10
-
executionTimeout
Define the time duration in seconds after which AWS Batch terminates unfinished jobs.
Value: text
When using JSON payload:
Define the payloadType, which defines the attributes that you want to pass to the application.
Important!When using the With JSON Payload option, you:
Must use the complete ARN for the Job Definition (arn:aws:batch:region:account:job-definition/definition-name:revision) and the Job Queue (arn:aws:batch:region:account:job-queue/queue-name).
Can also pass additional parameters to the job to replace parameter substitution placeholders that are set in the job definition. They are specified as a key and value pair mapping and override any corresponding parameter defaults from the job definition.
Value: JSON, JSON File Path
-
json
Enter the JSON payload definition. You can also use this field if you want to include this Job in a Workflow and you want to use Automation Engine variables in it.
-
filePath
Defines the path to the JSON file containing the attributes that you want to pass to the application.
-
See also: