AWS::ECS::TaskDefinition TaskDefinitionPlacementConstraint - AWS CloudFormation

AWS::ECS::TaskDefinition TaskDefinitionPlacementConstraint

The TaskDefinitionPlacementConstraint property specifies an object representing a constraint on task placement in the task definition.

If you are using the Fargate launch type, task placement constraints are not supported.

For more information, see Task Placement Constraints in the Amazon Elastic Container Service Developer Guide.


To declare this entity in your AWS CloudFormation template, use the following syntax:


{ "Expression" : String, "Type" : String }


Expression: String Type: String



A cluster query language expression to apply to the constraint. For more information, see Cluster query language in the Amazon Elastic Container Service Developer Guide.

Required: No

Type: String

Update requires: Replacement


The type of constraint. The MemberOf constraint restricts selection to be from a group of valid candidates.

Required: Yes

Type: String

Allowed values: memberOf

Update requires: Replacement