|
11 | 11 | aws_s3, |
12 | 12 | ) |
13 | 13 | from aws_cdk.aws_apigateway import DomainNameOptions |
14 | | -from aws_cdk.aws_apigatewayv2_alpha import DomainName |
| 14 | +from aws_cdk.aws_apigatewayv2 import DomainName |
15 | 15 | from config import AppConfig |
16 | 16 | from constructs import Construct |
17 | 17 | from eoapi_cdk import ( |
@@ -102,7 +102,7 @@ def __init__( |
102 | 102 | add_pgbouncer=True, |
103 | 103 | vpc=vpc, |
104 | 104 | engine=aws_rds.DatabaseInstanceEngine.postgres( |
105 | | - version=aws_rds.PostgresEngineVersion.VER_16 |
| 105 | + version=aws_rds.PostgresEngineVersion.VER_17 |
106 | 106 | ), |
107 | 107 | vpc_subnets=aws_ec2.SubnetSelection( |
108 | 108 | subnet_type=( |
@@ -130,6 +130,9 @@ def __init__( |
130 | 130 | "NAME": app_config.build_service_name("stac"), |
131 | 131 | "description": f"{app_config.stage} STAC API", |
132 | 132 | }, |
| 133 | + # SnapStart: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html |
| 134 | + # enable this to reduce API cold start times (comes with a fixed cost increase) |
| 135 | + enable_snap_start=False, |
133 | 136 | db=pgstac_db.connection_target, |
134 | 137 | db_secret=pgstac_db.pgstac_secret, |
135 | 138 | # If the db is not in the public subnet then we need to put |
@@ -165,6 +168,9 @@ def __init__( |
165 | 168 | "NAME": app_config.build_service_name("raster"), |
166 | 169 | "description": f"{app_config.stage} Raster API", |
167 | 170 | }, |
| 171 | + # SnapStart: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html |
| 172 | + # enable this to reduce API cold start times (comes with a fixed cost increase) |
| 173 | + enable_snap_start=False, |
168 | 174 | db=pgstac_db.connection_target, |
169 | 175 | db_secret=pgstac_db.pgstac_secret, |
170 | 176 | # If the db is not in the public subnet then we need to put |
@@ -203,6 +209,9 @@ def __init__( |
203 | 209 | "NAME": app_config.build_service_name("vector"), |
204 | 210 | "description": f"{app_config.stage} tipg API", |
205 | 211 | }, |
| 212 | + # SnapStart: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html |
| 213 | + # enable this to reduce API cold start times (comes with a fixed cost increase) |
| 214 | + enable_snap_start=False, |
206 | 215 | # If the db is not in the public subnet then we need to put |
207 | 216 | # the lambda within the VPC |
208 | 217 | vpc=vpc if not app_config.public_db_subnet else None, |
|
0 commit comments