AWS Batch Job Queue
This page shows how to write Terraform and CloudFormation for AWS Batch Job Queue and write them securely.
aws_batch_job_queue (Terraform)
The Job Queue in AWS Batch can be configured in Terraform with the resource name aws_batch_job_queue
. The following sections describe 3 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_batch_job_queue" "nf_default_queue" {
name = "nextflow-batch-default-queue"
tags = var.default_tags
state = "ENABLED"
priority = 1
compute_environments = [
resource "aws_batch_job_queue" "nextflow-queue" {
name = "nextflow-batch-job-queue"
state = "ENABLED"
priority = 1
compute_environments = [
aws_batch_compute_environment.sample.arn
resource "aws_batch_job_queue" "queue" {
name = var.name
state = var.state
priority = var.priority
compute_environments = var.compute_environments
Parameters
-
arn
optional computed - string -
compute_environments
required - list of string -
id
optional computed - string -
name
required - string -
priority
required - number -
state
required - string -
tags
optional - map from string to string
Explanation in Terraform Registry
Provides a Batch Job Queue resource.
AWS::Batch::JobQueue (CloudFormation)
The JobQueue in Batch can be configured in CloudFormation with the resource name AWS::Batch::JobQueue
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::Batch::JobQueue
Properties:
JobQueueName: "HighPriority"
Priority: 1000
State: ENABLED
ComputeEnvironmentOrder:
Type: AWS::Batch::JobQueue
Properties:
JobQueueName: "HighPriority"
Priority: 1000
State: ENABLED
ComputeEnvironmentOrder:
Type: AWS::Batch::JobQueue
Properties:
JobQueueName: "ScHighPriority"
Priority: 1000
State: ENABLED
ComputeEnvironmentOrder:
Type: AWS::Batch::JobQueue
Properties:
JobQueueName: "HighPriority"
Priority: 1000
State: ENABLED
ComputeEnvironmentOrder:
Type: AWS::Batch::JobQueue
Properties:
ComputeEnvironmentOrder:
- Order: 0
ComputeEnvironment: !Ref SmallCPUMultifishOnDemandEnv
State: ENABLED
"AWS::Batch::JobQueue.ComputeEnvironmentOrder": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobqueue-computeenvironmentorder.html",
"Properties": {
"ComputeEnvironment": {
"Required": true,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobqueue-computeenvironmentorder.html#cfn-batch-jobqueue-computeenvironmentorder-computeenvironment",
"AWS::Batch::JobQueue.ComputeEnvironmentOrder": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobqueue-computeenvironmentorder.html",
"Properties": {
"ComputeEnvironment": {
"Required": true,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobqueue-computeenvironmentorder.html#cfn-batch-jobqueue-computeenvironmentorder-computeenvironment",
"Type": "AWS::Batch::JobQueue"
},
"GenJobQueue": {
"Properties": {
"ComputeEnvironmentOrder": [
{
"Type": "AWS::Batch::JobQueue"
},
"GenJobQueue": {
"Properties": {
"ComputeEnvironmentOrder": [
{
"Type" : "AWS::Batch::JobQueue",
"Properties" : {
"Priority" : 1,
"ComputeEnvironmentOrder" : [
{
"Order" : 1,
Parameters
-
ComputeEnvironmentOrder
required - List of ComputeEnvironmentOrder -
Priority
required - Integer -
State
optional - String -
SchedulingPolicyArn
optional - String -
JobQueueName
optional - String -
Tags
optional - Json
Explanation in CloudFormation Registry
The
AWS::Batch::JobQueue
resource specifies the parameters for an AWS Batch job queue definition. For more information, see Job Queues in the AWS Batch User Guide.
Frequently asked questions
What is AWS Batch Job Queue?
AWS Batch Job Queue is a resource for Batch of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Batch Job Queue?
For Terraform, the AlexsLemonade/alsf-scpca, kujalk/NextFlow-AWS-Batch and wojtek099/samples source code examples are useful. See the Terraform Example section for further details.
For CloudFormation, the jbaden15/aws_batch_genomics_step_function, aws-samples/aws-batch-genomics and ImerM/sag_aws source code examples are useful. See the CloudFormation Example section for further details.