Queue
Learn how to create, update, and manage AWS PCS Queues using Alchemy Cloud Control.
The Queue resource allows you to create and manage AWS PCS Queues which are essential for processing jobs in a distributed manner.
Minimal Example
Section titled “Minimal Example”Create a basic PCS Queue with required properties and an optional tag.
import AWS from "alchemy/aws/control";
const pcsQueue = await AWS.PCS.Queue("myQueue", { clusterId: "pcs-cluster-1", tags: { Environment: "Production" }});
Advanced Configuration
Section titled “Advanced Configuration”Configure a queue with compute node group configurations for more granular control over task execution.
import AWS from "alchemy/aws/control";
const advancedQueue = await AWS.PCS.Queue("advancedQueue", { clusterId: "pcs-cluster-1", computeNodeGroupConfigurations: [ { instanceType: "c5.large", desiredSize: 2, maxSize: 5, minSize: 1 } ], name: "AdvancedQueue"});
Queue with Adoption
Section titled “Queue with Adoption”Create a queue that adopts an existing resource if it is already present.
import AWS from "alchemy/aws/control";
const adoptedQueue = await AWS.PCS.Queue("adoptedQueue", { clusterId: "pcs-cluster-1", adopt: true, name: "ExistingQueue"});
Queue with Multiple Tags
Section titled “Queue with Multiple Tags”Demonstrate how to create a queue with multiple tags for better resource management.
import AWS from "alchemy/aws/control";
const taggedQueue = await AWS.PCS.Queue("taggedQueue", { clusterId: "pcs-cluster-1", tags: { Project: "DataProcessing", Owner: "TeamA", Environment: "Development" }});