This module:
- deploys an IAM Role assumed by the DAG with permissions to execute the Jobs
- Creates different AWS Batch Compute resources based on the user input
- Creates AWS Batch Queue(s) based on the user input
- Creates 2 sample dags (one gets executed on EC2 and the other on Fargate)
dag-bucket-name
: name of the Bucket configured in the shared MWAA Environment to store DAG artifactsdag-path
: name of the path in the Bucket configured in the shared MWAA Environment to store DAG artifactsmwaa-exec-role
: ARN of the MWAA Execution Rolevpc-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
- 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)
DagRoleArn
: ARN of the DAG Execution Role created by the StackOnDemandJobQueueArn
: ARN of the ON_DEMAND AWS Batch QueueSpotJobQueueArn
: ARN of the SPOT AWS Batch QueueFargateJobQueueArn
: ARN of the FARGATE AWS Batch Queue
{
"DagRoleArn": "arn::::",
"OnDemandJobQueueArn": "arn::::",
"SpotJobQueueArn": "arn::::",
"FargateJobQueueArn": "arn::::"
}