1
1
AWSTemplateFormatVersion : 2010-09-09
2
2
Transform : AWS::Serverless-2016-10-31
3
3
Description : Provision an instance of the AI Proxy service.
4
+
5
+ # Dependencies: This template has dependencies, look for !ImportValue in the Resources section.
6
+
4
7
Parameters :
5
8
BaseDomainName :
6
9
Type : String
@@ -60,7 +63,9 @@ Resources:
60
63
SecurityGroups :
61
64
- !ImportValue VPC-ELBSecurityGroup
62
65
Subnets :
63
- # TODO: This copies geocoder and the code.org load balancer, but we may prefer something unique
66
+ # Place load balancer in public subnets, so it's accessible from the internet.
67
+ # We may want to move this to the private subnets, so only internal resources
68
+ # can access it, but this is very convenient for local development.
64
69
- !ImportValue VPC-PublicSubnetB
65
70
- !ImportValue VPC-PublicSubnetC
66
71
- !ImportValue VPC-PublicSubnetD
@@ -120,7 +125,9 @@ Resources:
120
125
121
126
ECSService :
122
127
Type : " AWS::ECS::Service"
123
- DependsOn : Listener
128
+ DependsOn :
129
+ - HttpListener
130
+ - HttpsListener
124
131
Properties :
125
132
Cluster : !Ref ECSCluster
126
133
DesiredCount : 1
@@ -132,9 +139,11 @@ Resources:
132
139
SecurityGroups :
133
140
- !Ref ECSSecurityGroup
134
141
Subnets :
135
- # TODO: This copies geocoder , but we should probably have a separate subnet for this service .
142
+ # Place ECS Service in private subnets , but traffic should use the LoadBalancer .
136
143
- !ImportValue VPC-SubnetB
137
144
- !ImportValue VPC-SubnetC
145
+ - !ImportValue VPC-SubnetD
146
+ - !ImportValue VPC-SubnetE
138
147
LoadBalancers :
139
148
- ContainerName : aiproxy
140
149
ContainerPort : 80
0 commit comments