Here is an example of a BATCH setup.
sampleBatch:
Type: AWS::Batch::ComputeEnvironment
Properties:
State: ENABLED
Type: MANAGED
ServiceRole: !GetAtt awsBatchServiceRole.Arn
ComputeResources:
MaxvCpus: 20
MinvCpus: 0
SecurityGroupIds:
- !Join [ ",", !Ref "securityGroups" ]
Type: EC2
ImageId: !Ref batchAmiImage
InstanceRole: !GetAtt ecsInstanceProfile.Arn
InstanceTypes:
- m4.large
Ec2KeyPair: !Ref ec2KeyPair
Subnets: !Ref subnets
Tags:
Name: "Testing Batch Env"
sampleBatchJobQueue:
Type: "AWS::Batch::JobQueue"
Properties:
ComputeEnvironmentOrder:
- Order: 1
ComputeEnvironment: !Ref sampleBatch
State: ENABLED
Priority: 1000
sampleCnvBatchJobDefinition:
Type: "AWS::Batch::JobDefinition"
Properties:
Type: container
ContainerProperties:
JobRoleArn: !Ref ecsTaskRole
Image: !Sub "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/${dockerCnvCallerRepository}:latest"
Vcpus: 2
Memory: 2000
MountPoints:
- ReadOnly: false
SourceVolume: genomics
ContainerPath: /genomics
Volumes:
- Host:
SourcePath: /genomics
Name: genomics
When I submit multiple jobs, they get queued.
What I want to achieve is that Batch start new instance for each job.
I cannot find a combination of settings that will allow me to do this.
Any advice welcome.