Created
October 6, 2021 18:18
-
-
Save kevinhooke/cb9244221334e30a0760f59c6b1dc099 to your computer and use it in GitHub Desktop.
AWS CloudFormation example for ECS Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Example ECS Service", | |
"Parameters": { | |
"VPCSecurityGroupId": { | |
"Type": "String" | |
}, | |
"VPCSubnetId": { | |
"Type": "String" | |
} | |
}, | |
"Resources": { | |
"ECSExampleService1": { | |
"Type": "AWS::ECS::Service", | |
"Properties": { | |
"Cluster": "ecs-example-cluster", | |
"ServiceName": "ExampleService", | |
"TaskDefinition": "taskdef-name:1", | |
"DesiredCount": 1, | |
"LaunchType": "FARGATE", | |
"NetworkConfiguration": { | |
"AwsvpcConfiguration": { | |
"AssignPublicIp": "DISABLED", | |
"SecurityGroups": [ | |
{ | |
"Ref": "VPCSecurityGroupId" | |
} | |
], | |
"Subnets": [ | |
{ | |
"Ref": "VPCSubnetId" | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment