Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Created October 6, 2021 18:18
Show Gist options
  • Save kevinhooke/cb9244221334e30a0760f59c6b1dc099 to your computer and use it in GitHub Desktop.
Save kevinhooke/cb9244221334e30a0760f59c6b1dc099 to your computer and use it in GitHub Desktop.
AWS CloudFormation example for ECS Service
{
"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