

# Working with on-demand queues
<a name="working-with-on-demand-queues"></a>

Your account starts with one on-demand queue, which is the default queue when you create jobs. With on-demand queues, you pay based on usage. For pricing details, see [AWS Elemental MediaConvert pricing](https://aws.amazon.com/mediaconvert/pricing/). 

This section describes processing multiple jobs in parallel, creating additional queues, viewing queues, updating queues, pausing or activating queues, and deleting queues.

**Topics**
+ [Processing multiple jobs in parallel](#queue-resources)
+ [Creating a queue](creating-queues.md)
+ [Updating queues](updating-queue-status.md)
+ [Viewing queue details](listing-queues.md)
+ [Deleting a queue](deleting-a-queue.md)

## Processing multiple jobs in parallel
<a name="queue-resources"></a>

The total number of jobs that you can process concurrently depends on the following: 

Service quota for **Concurrent jobs per account**  
Your account has a service quota for the maximum number of jobs that MediaConvert can process at one time, across *all* of your on-demand queues in the current AWS Region. You can request an increase to this quota by using the [Service Quotas](https://console.aws.amazon.com/servicequotas/home/services/mediaconvert/quotas) console.

Service quota for **Concurrent jobs per on-demand queue**  
Your account has a service quota for the maximum number of concurrent jobs that are available to any *individual* on-demand queue in the current AWS Region. You can request an increase to this quota by using the [Service Quotas](https://console.aws.amazon.com/servicequotas/home/services/mediaconvert/quotas) console.

Queue configuration for **Concurrent jobs**  
Each of your on-demand queues has a setting for Concurrent jobs, which is the maximum number of jobs it can process at one time. This setting is constrained by both of the above service quotas. With any individual queue, you can set Concurrent jobs up to your service quota for Concurrent jobs *per on-demand queue*. With multiple on-demand queues, the total number of concurrent jobs combined must also be less than or equal to your service quota for Concurrent jobs *per account*.

When your on-demand queue is running at its maximum concurrent job count and a job completes, MediaConvert selects the next job to process based on the job's *priority*. For more information, see [Setting job priority](setting-the-priority-of-a-job.md).

If a job stays in a `SUBMITTED` state for too long instead of moving to `PROGRESSING`, then your on-demand queue is likely already processing the maximum number of concurrent jobs that it can. To address this, first [check how many unallocated jobs that you have available](listing-queues.md). If you have unallocated jobs available, you can either [increase the Concurrent job count for your queue](updating-queue-status.md), or you can [create a new queue](creating-queues.md). If you don't have unallocated jobs available, you can request an increase to your quotas by using the [Service Quotas](https://console.aws.amazon.com/servicequotas/home/services/mediaconvert/quotas) console.

If you occasionally need to process jobs right away:

1. Use job priority. Submit most of your jobs with a low priority setting, and submit high priority jobs with a higher priority. When you choose this option, you must wait for jobs that are already processing to complete before the higher priority jobs begin. For more information, see [Setting job priority](setting-the-priority-of-a-job.md).

1. Use multiple queues. Submit most of your jobs to a queue with a high concurrent job count, and submit high priority jobs to a different queue with a low concurrent job count. When you choose this option, you keep some transcoding resources idle, but available, until you need them.

You can also organize your jobs with multiple on-demand queues. For example, you might run jobs for different workflows in separate queues. MediaConvert processes these jobs across multiple queues in parallel. You can use [Tags](tagging-mediaconvert-resources.md) to keep track of jobs with different workflows as well.

**Performance testing**  
We recommend that you test any workflow with specific performance requirements. By default, MediaConvert optimizes the performance of your queue for the most common job types. If your workflow primarily includes a large number of jobs that complete quickly, or if you have a question about your queue's performance, contact [AWS support](https://aws.amazon.com/contact-us/).

# Creating a queue
<a name="creating-queues"></a>

AWS Elemental MediaConvert provides a default on-demand queue. A default queue is available in all AWS Regions. Other queues appear only in the AWS Region where they are created. To add additional resources to your account, you can create your own on-demand queues. 

To learn how queues affect the way that MediaConvert allocates the processing of resources, see [Processing multiple jobs in parallel](working-with-on-demand-queues.md#queue-resources). The following tabs show different options for creating an on-demand queue.

------
#### [ Console ]

To create an on-demand queue by using the MediaConvert console:

1. Open the [Queues](https://console.aws.amazon.com/mediaconvert/home#/queues/list) page in the MediaConvert console.

1. Choose **Create queue**.

1. Enter a **Name**. Then optionally enter a **Description** and any **Tags**.

1. Optionally enter a value for **Concurrent jobs**.

1. Choose **Create queue**.

------
#### [ AWS CLI ]

The following `create-queue` example creates a new on-demand queue with 100 concurrent jobs.

```
aws mediaconvert create-queue \
	--region region-name-1 \
	--name Queue1 \
	--description "Example queue description." \
	--concurrentJobs "100" \
	--tags "KeyName1=string1,KeyName2=string2"
```

For more information about how to create an on-demand queue by using the AWS CLI, see the [AWS CLI Command Reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/mediaconvert/create-queue.html).

------

# Updating queues
<a name="updating-queue-status"></a>

You can update an existing queue to change its **Name**, **Concurrent jobs**, or **Status**.

Use **Description** to help keep details about your queues.

Use **Concurrent jobs** to specify the maximum number of jobs your queue can process concurrently.

Use **Status** to manage whether a queue is **Active** or **Paused**. New queues default to an **Active** status and are available to process jobs immediately. You can optionally **Pause** a queue to stop processing any additional jobs. When you pause jobs, MediaConvert finishes processing jobs that are already running. If you submit a job to a paused queue, its status will remain in `SUBMITTED` until you change the queue's status back to **Active** or cancel the job. 

The following tabs show how to change the status of an on-demand queue.

------
#### [ Console  ]

To update an on-demand queue by using the MediaConvert console:

1. Open the [Queues](https://console.aws.amazon.com/mediaconvert/home#/queues/list) page in the MediaConvert console.

1. In the **On-demand queues** section, select the queue.

1. Choose **Edit queue**.

1. Change the **Description**, **Concurrent jobs**, or **Status** of your queue.

1. Choose **Save queue**.

------
#### [ AWS CLI  ]

The following `update-queue` example pauses an active on-demand queue.

```
aws mediaconvert update-queue \
	--name Queue1 \
	--status PAUSED
```

The following `update-queue` example activates a paused on-demand queue.

```
aws mediaconvert update-queue \
	--name Queue1 \
	--status ACTIVE
```

The following `update-queue` example changes the number of Concurrent jobs for an on-demand queue.

```
aws mediaconvert update-queue \
	--name Queue1 \
	--concurrentJobs 250
```

For more information about how to change the status of an on-demand queue by using the AWS CLI, see the [AWS CLI Command Reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/mediaconvert/update-queue.html).

------

# Viewing on-demand queue details
<a name="listing-queues"></a>

You can list the queues that are associated with your AWS account and get details about those queues. 

These details include ARN, name, status, description, job count information, and more. The following tabs show different options for viewing queue details.

------
#### [ Console  ]

To view details about your on-demand queues by using the MediaConvert console, open the [Queues](https://console.aws.amazon.com/mediaconvert/home#/queues/list) page. Select a queue to view its ARN.

------
#### [ AWS CLI  ]

The following `list-queues` example lists all of your queues.

```
aws mediaconvert list-queues
```

The following JSON is an example list-queues response.

```
{
	"Queues": [
		{	
			"Arn": "arn:aws:mediaconvert:us-west-2:111122223333:queues/Example",
			"CreatedAt": "2023-06-19T09:34:25-07:00",
			"LastUpdated": "2023-06-19T09:34:25-07:00",
			"Name": "Example",
			"PricingPlan": "ON_DEMAND",
			"ProgressingJobsCount": 0,
			"Status": "ACTIVE",
			"SubmittedJobsCount": 0,
			"ConcurrentJobs" 700,
			"TotalConcurrentJobs" 1000,
			"unallocatedConcurrentJobs" 100,
			"Type": "CUSTOM"
		},
		{
			"Arn": "arn:aws:mediaconvert:us-west-2:111122223333:queues/Default",
			"CreatedAt": "2018-05-16T09:13:08-07:00",
			"LastUpdated": "2021-05-14T15:39:23-07:00",
			"Name": "Default",
			"PricingPlan": "ON_DEMAND",
			"ProgressingJobsCount": 0,
			"Status": "ACTIVE",
			"SubmittedJobsCount": 0,
			"ConcurrentJobs" 200,
			"TotalConcurrentJobs" 1000,
			"unallocatedConcurrentJobs" 100,
			"Type": "SYSTEM"
		}
	]
}
```

For more information about how to list queues by using the AWS CLI, see the [AWS CLI Command Reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/mediaconvert/list-queues.html).

------

# Deleting a queue
<a name="deleting-a-queue"></a>

You can delete any queue other than the default queue. You can't delete a queue that contains unprocessed jobs. The following tabs show how to delete an on-demand queue.

------
#### [ Console  ]

To delete an on-demand queue by using the MediaConvert console:

1. Open the [Queues](https://console.aws.amazon.com/mediaconvert/home#/queues/list) page in the MediaConvert console.

1. Select the queue.

1. Choose **Delete queue**.

------
#### [ AWS CLI  ]

The following `delete-queue` example deletes on-demand queue.

```
aws mediaconvert delete-queue \
	--name Queue1
```

For more information about how to delete an on-demand queue by using the AWS CLI, see the [AWS CLI Command Reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/mediaconvert/delete-queue.html).

------