Skip to content

Commit 109b077

Browse files
committed
Increase API load balancer timeout
- Increase API Backend load balancer timeout from 60s to 180s - Bump PostgreSQL engine version for AWS RDS from 11.19 to 13.10 - Cleanup unused Route53 entry (must be removed) - Enable HTTP/2 in API Backend load balancer explicitly (no infra change) - Add experimental dummy Route53 entries to new tasks.hotosm.org hosted zone. Both A and AAAA resource records are added
1 parent c2558e1 commit 109b077

File tree

1 file changed

+38
-16
lines changed

1 file changed

+38
-16
lines changed

scripts/aws/cloudformation/tasking-manager.template.js

+38-16
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ const Parameters = {
1515
Type: 'String'
1616
},
1717
NetworkEnvironment: {
18+
Description: "Legacy parameter aka Deployment Environment",
1819
Type :'String',
19-
AllowedValues: ['staging', 'production']
20+
AllowedValues: ['demo', 'staging', 'production']
2021
},
2122
AutoscalingPolicy: {
2223
Type: 'String',
@@ -51,7 +52,7 @@ const Parameters = {
5152
DatabaseEngineVersion: {
5253
Description: 'AWS PostgreSQL Engine version',
5354
Type: 'String',
54-
Default: '11.19'
55+
Default: '13.10'
5556
},
5657
DatabaseInstanceType: {
5758
Description: 'Database instance type',
@@ -174,6 +175,11 @@ const Parameters = {
174175
Description: 'Org Code',
175176
Type: 'String'
176177
},
178+
TaskingManagerOrgDomain: {
179+
Description: 'FQDN for Organisation used as suffix for DNS entries',
180+
Type: 'String',
181+
Default: 'hotosm.org'
182+
},
177183
SentryBackendDSN: {
178184
Description: "DSN for sentry",
179185
Type: 'String'
@@ -560,13 +566,42 @@ const Resources = {
560566
Type: 'AWS::ElasticLoadBalancingV2::LoadBalancer',
561567
Properties: {
562568
Name: cf.stackName,
569+
IpAddressType: 'dualstack',
570+
LoadBalancerAttributes: [
571+
{ "Key": "routing.http2.enabled", "Value": "true" },
572+
{ "Key": "idle_timeout.timeout_seconds", "Value": "180" },
573+
],
563574
SecurityGroups: [cf.importValue(cf.join('-', ['hotosm-network-production', cf.ref('NetworkEnvironment'), 'elbs-security-group', cf.region]))],
564575
Subnets: cf.ref('ELBSubnets'),
565576
Type: 'application',
566-
IpAddressType: 'dualstack',
567577
Tags: [ { "Key": "stack_name", "Value": cf.stackName } ]
568578
}
569579
},
580+
BackendAPIDNSEntries: {
581+
Type: "AWS::Route53::RecordSetGroup",
582+
Properties: {
583+
Comment: "DNS records pointing to API backend",
584+
HostedZoneId: 'Z05223682CWA7KUW593DH', // NOTE: tasks.hotosm.org HostedZone ID on Route53
585+
RecordSets: [
586+
{
587+
Name: cf.join('.', [ cf.join('-', ['api', cf.ref('NetworkEnvironment')]), 'tasks.hotosm.org']),
588+
Type: 'A',
589+
AliasTarget: {
590+
DNSName: cf.getAtt('TaskingManagerLoadBalancer', 'DNSName'),
591+
HostedZoneId: cf.getAtt('TaskingManagerLoadBalancer', 'CanonicalHostedZoneID') // NOTE: AWS Route53 Canonical HostedZone ID
592+
}
593+
},
594+
{
595+
Name: cf.join('.', [ cf.join('-', ['api', cf.ref('NetworkEnvironment')]), 'tasks.hotosm.org']),
596+
Type: 'AAAA',
597+
AliasTarget: {
598+
DNSName: cf.getAtt('TaskingManagerLoadBalancer', 'DNSName'),
599+
HostedZoneId: cf.getAtt('TaskingManagerLoadBalancer', 'CanonicalHostedZoneID') // NOTE: AWS Route53 Canonical HostedZone ID
600+
},
601+
}
602+
]
603+
}
604+
},
570605
TaskingManagerLoadBalancerRoute53: {
571606
Type: 'AWS::Route53::RecordSet',
572607
Properties: {
@@ -755,19 +790,6 @@ const Resources = {
755790
}
756791
}
757792
},
758-
TaskingManagerRoute53: {
759-
Type: 'AWS::Route53::RecordSet',
760-
Condition: 'IsHOTOSMUrl',
761-
Properties: {
762-
Name: 't0.hotosm.org',
763-
Type: 'A',
764-
AliasTarget: {
765-
DNSName: cf.getAtt('TaskingManagerReactCloudfront', 'DomainName'),
766-
HostedZoneId: 'Z2FDTNDATAQYW2'
767-
},
768-
HostedZoneId: 'Z2O929GW6VWG99',
769-
}
770-
},
771793
TaskingManagerDNSEntries: {
772794
Type: "AWS::Route53::RecordSetGroup",
773795
Condition: "IsHOTOSMUrl",

0 commit comments

Comments
 (0)