AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ECS::TaskSet

CfnTaskSet

Create a task set in the specified cluster and service. This is used when a service uses the `EXTERNAL` deployment controller type. For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the *Amazon Elastic Container Service Developer Guide* . > On March 21, 2024, a change was made to resolve the task definition revision before authorization. When a task definition revision is not specified, authorization will occur using the latest revision of a task definition. For information about the maximum number of task sets and other quotas, see [Amazon ECS service quotas](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-quotas.html) in the *Amazon Elastic Container Service Developer Guide* .

Import

import { CfnTaskSet } from 'aws-cdk-lib/aws-ecs';

Or use the module namespace:

import * as ecs from 'aws-cdk-lib/aws-ecs';
// ecs.CfnTaskSet

Properties

Configuration passed to the constructor as CfnTaskSetProps.

clusterRequired
string

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.

serviceRequired
string

The short name or full Amazon Resource Name (ARN) of the service to create the task set in.

taskDefinitionRequired
string

The task definition for the tasks in the task set to use. If a revision isn't specified, the latest `ACTIVE` revision is used.

capacityProviderStrategyOptional
IResolvable | IResolvable | CapacityProviderStrategyItemProperty[]

The capacity provider strategy that are associated with the task set.

externalIdOptional
string

An optional non-unique tag that identifies this task set in external systems. If the task set is associated with a service discovery registry, the tasks in this task set will have the `ECS_TASK_SET_EXTERNAL_ID` AWS Cloud Map attribute set to the provided value.

launchTypeOptional
string

The launch type that new tasks in the task set uses. For more information, see [Amazon ECS launch types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide* . If a `launchType` is specified, the `capacityProviderStrategy` parameter must be omitted.

loadBalancersOptional
IResolvable | IResolvable | LoadBalancerProperty[]

A load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.

networkConfigurationOptional
IResolvable | NetworkConfigurationProperty

The network configuration for the task set.

platformVersionOptional
string

The platform version that the tasks in the task set uses. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the `LATEST` platform version is used.

scaleOptional
IResolvable | ScaleProperty

A floating-point percentage of your desired number of tasks to place and keep running in the task set.

serviceRegistriesOptional
IResolvable | IResolvable | ServiceRegistryProperty[]

The details of the service discovery registries to assign to this task set. For more information, see [Service discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) .

tagsOptional
CfnTag[]

The metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. The following basic restrictions apply to tags: - Maximum number of tags per resource - 50 - For each resource, each tag key must be unique, and each tag key can have only one value. - Maximum key length - 128 Unicode characters in UTF-8 - Maximum value length - 256 Unicode characters in UTF-8 - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon ECS Cheat Sheet

Everything you need to know about Amazon ECS on one page. HD quality, print-friendly.

Download Free Infographic