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

Amazon EC2 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 EC2 Container Service (Amazon ECS) service.

Syntax

JSON

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

YAML

Copy
Type: String Expression: String

Properties

Type

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 the selection to a group of valid candidates, use memberOf. distinctInstance is not supported in task definitions.

Required: Yes

Type: String

Update requires: Replacement

Expression

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 EC2 Container Service Developer Guide.

Required: No

Type: String

Update requires: Replacement

On this page: