Skip to content
GitHubXDiscord

PrimaryTaskSet

The PrimaryTaskSet resource allows you to manage AWS ECS PrimaryTaskSets for your containerized applications. This resource is essential for managing the task sets that are running under an Amazon ECS service.

Create a basic PrimaryTaskSet with required properties.

import AWS from "alchemy/aws/control";
const primaryTaskSet = await AWS.ECS.PrimaryTaskSet("myPrimaryTaskSet", {
TaskSetId: "my-task-set-id",
Cluster: "my-cluster-name",
Service: "my-service-name",
adopt: true // Allows adoption of existing resource
});

Configure a PrimaryTaskSet with additional optional properties.

const advancedTaskSet = await AWS.ECS.PrimaryTaskSet("advancedTaskSet", {
TaskSetId: "advanced-task-set-id",
Cluster: "production-cluster",
Service: "production-service",
adopt: true // Adopt existing resource
});

Demonstrate updating an existing PrimaryTaskSet with new properties.

const updatedTaskSet = await AWS.ECS.PrimaryTaskSet("updatedTaskSet", {
TaskSetId: "my-task-set-id",
Cluster: "my-cluster-name",
Service: "my-service-name",
adopt: false // Do not adopt existing resource
});

Show how to create and manage a PrimaryTaskSet with realistic values and configurations.

const completeTaskSet = await AWS.ECS.PrimaryTaskSet("completeTaskSet", {
TaskSetId: "complete-task-set-id",
Cluster: "production-cluster",
Service: "web-service",
adopt: true // Allows adoption of existing resource
});