This module:
- Creates different AWS Batch Compute resources based on the configuration
- Creates AWS Batch Queue(s) based on the user input
vpc-id
: The VPC-ID that the cluster will be created inprivate-subnet-ids
: The Private Subnets that the AWS Batch Compute resources will be deployed tobatch-compute
: The Configuration Map for creating AWS Batch Compute environment(s). Below is a sample snippet for providingbatch-compute
input
solution-id
: a unique identifier for this deployment (must be used withsolution-description
)solution-name
: a unique name for this deployment (must be used withsolution-id
)solution-version
: a unique version for this deployment
The parameters (solution-*)
will resolve a custom text that is used as a description of the stack if populated.
- name: batch-compute
value:
batch_compute_config:
- env_name: ng1
compute_type: ON_DEMAND
max_vcpus: 256
desired_vcpus: 0
order: 1
instance_types: #Example of providing explicit instance type(s)
- "m5.large"
- env_name: ng2
max_vcpus: 256
desired_vcpus: 0
compute_type: SPOT
order: 1
# instance_types: #if not set, the code defaults to "optimal", where AWS Batch launches the right instance type based on the job definition requirement
# - "m5.large"
- env_name: ng3
max_vcpus: 256
desired_vcpus: 0
compute_type: FARGATE
order: 1
The above example provides 3 different compute types (ON_DEMAND, SPOT, FARGATE)
BatchPolicyString
: Iam Policy for Orchestration Tools like Airflow & Step Functions to Submit Jobs to BatchBatchSecurityGroupId
: Security Group Id of the Batch Compute ECS ClusterOnDemandJobQueueArn
: ARN of the ON_DEMAND AWS Batch QueueSpotJobQueueArn
: ARN of the SPOT AWS Batch QueueFargateJobQueueArn
: ARN of the FARGATE AWS Batch Queue
{
"BatchPolicyString": "{iam_policy_doc_string}",
"BatchSecurityGroupId": "sg-...",
"OnDemandJobQueueArn": "arn::::",
"SpotJobQueueArn": "arn::::",
"FargateJobQueueArn": "arn::::",
}