AWS CloudFormation
User Guide (API Version 2010-05-15)

Amazon Elastic Container Service Service PlacementConstraint

PlacementConstraint is a property of the AWS::ECS::Service resource that specifies the placement constraints for the tasks in the service to associate with an Amazon Elastic Container Service (Amazon ECS) service.



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


Type: String Expression: String



The type of constraint: distinctInstance or memberOf.

To ensure that each task in a particular group is running on a different container instance, use distinctInstance. To restrict selection to a group of valid candidates, use memberOf. distinctInstance is not supported in task definitions.

Required: Yes

Type: String

Update requires: Replacement


A cluster query language expression to apply to the constraint. If the constraint type is distinctInstance, you can't specify an expression. For more information, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.

Required: No

Type: String

Update requires: Replacement

On this page: