Skip to content

Commit 9b0367f

Browse files
Merge branch 'main' of github.com:code-dot-org/aiproxy into darin-breaks-things
2 parents 43b2251 + fb6fda6 commit 9b0367f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

cicd/3-app/aiproxy/template.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
AWSTemplateFormatVersion: 2010-09-09
22
Transform: AWS::Serverless-2016-10-31
33
Description: Provision an instance of the AI Proxy service.
4+
5+
# Dependencies: This template has dependencies, look for !ImportValue in the Resources section.
6+
47
Parameters:
58
BaseDomainName:
69
Type: String
@@ -60,7 +63,9 @@ Resources:
6063
SecurityGroups:
6164
- !ImportValue VPC-ELBSecurityGroup
6265
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.
6469
- !ImportValue VPC-PublicSubnetB
6570
- !ImportValue VPC-PublicSubnetC
6671
- !ImportValue VPC-PublicSubnetD
@@ -120,7 +125,9 @@ Resources:
120125

121126
ECSService:
122127
Type: "AWS::ECS::Service"
123-
DependsOn: Listener
128+
DependsOn:
129+
- HttpListener
130+
- HttpsListener
124131
Properties:
125132
Cluster: !Ref ECSCluster
126133
DesiredCount: 1
@@ -132,9 +139,11 @@ Resources:
132139
SecurityGroups:
133140
- !Ref ECSSecurityGroup
134141
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.
136143
- !ImportValue VPC-SubnetB
137144
- !ImportValue VPC-SubnetC
145+
- !ImportValue VPC-SubnetD
146+
- !ImportValue VPC-SubnetE
138147
LoadBalancers:
139148
- ContainerName: aiproxy
140149
ContainerPort: 80

0 commit comments

Comments
 (0)