Skip to content

Instantly share code, notes, and snippets.

@SumindaD
Created November 9, 2019 19:07
Show Gist options
  • Save SumindaD/ff8a139bcaadab084a739e59f274e43b to your computer and use it in GitHub Desktop.
Save SumindaD/ff8a139bcaadab084a739e59f274e43b to your computer and use it in GitHub Desktop.
ECSService:
Type: AWS::ECS::Service
DependsOn: LoadBalancerListener
Properties:
ServiceName: !Join ['-', [!Ref Stage, !Ref 'AWS::AccountId', 'ECSService']]
Cluster: !Ref Cluster
TaskDefinition: !Ref TaskDefinition
DesiredCount: 2
LaunchType: FARGATE
NetworkConfiguration:
AwsvpcConfiguration:
AssignPublicIp: ENABLED
Subnets:
- !Ref SubnetA
- !Ref SubnetB
SecurityGroups:
- !Ref ContainerSecurityGroup
LoadBalancers:
- ContainerName: !Join ['-', [!Ref Stage, !Ref 'AWS::AccountId', 'Container']]
ContainerPort: !Ref ContainerPort
TargetGroupArn: !Ref TargetGroup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment