Skip to content

Commit

Permalink
improve placement strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittig committed Mar 19, 2018
1 parent 2c0c027 commit b9629af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ecs/service-cluster-alb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ Resources:
- ContainerName: main
ContainerPort: 80
TargetGroupArn: !Ref LoadBalancerTargetGroup
PlacementStrategies:
- Type: spread
Field: 'attribute:ecs.availability-zone'
- Type: spread
Field: instanceId
Role: !GetAtt 'ServiceRole.Arn'
TaskDefinition: !Ref TaskDefinition
ScalableTargetRole: # based on http://docs.aws.amazon.com/AmazonECS/latest/developerguide/autoscale_IAM_role.html
Expand Down
5 changes: 5 additions & 0 deletions ecs/service-dedicated-alb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ Resources:
- ContainerName: main
ContainerPort: 80
TargetGroupArn: !Ref DefaultTargetGroup
PlacementStrategies:
- Type: spread
Field: 'attribute:ecs.availability-zone'
- Type: spread
Field: instanceId
Role: !GetAtt 'ServiceRole.Arn'
TaskDefinition: !Ref TaskDefinition
ScalableTargetRole: # based on http://docs.aws.amazon.com/AmazonECS/latest/developerguide/autoscale_IAM_role.html
Expand Down

0 comments on commit b9629af

Please sign in to comment.