From d481e3d8d7cea1cdab45bd672baa5efde86778b1 Mon Sep 17 00:00:00 2001 From: Caleb Godwin <75450124+cgodwin1@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:49:53 -0500 Subject: [PATCH 1/2] update PostgreSQL engine to 15.8 (#1511) --- solution/backend/serverless.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solution/backend/serverless.yml b/solution/backend/serverless.yml index 6b4ca9ffa4..d33c1b9499 100644 --- a/solution/backend/serverless.yml +++ b/solution/backend/serverless.yml @@ -292,7 +292,7 @@ resources: DBSubnetGroupName: Ref: DBSubnetGroup Engine: aurora-postgresql - EngineVersion: "15.2" + EngineVersion: "15.8" DatabaseName: 'eregs' BackupRetentionPeriod: 7 DBClusterParameterGroupName: @@ -306,7 +306,7 @@ resources: DBInstanceClass: db.r6g.large StorageEncrypted: true Engine: aurora-postgresql - EngineVersion: "15.2" + EngineVersion: "15.8" PubliclyAccessible: false DBParameterGroupName: Ref: AuroraRDSInstanceParameter15 From 12199b753319e0356666a8710003dd4bc9c612b5 Mon Sep 17 00:00:00 2001 From: Caleb Godwin <75450124+cgodwin1@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:55:05 -0500 Subject: [PATCH 2/2] EREGCSC-2904 Set statement_timeout back to 10 seconds (#1512) * revert postgres statement and connect timeouts to 10 seconds * add statement_timeout to cluster settings --- solution/backend/cmcs_regulations/settings/deploy.py | 2 +- solution/backend/serverless.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/solution/backend/cmcs_regulations/settings/deploy.py b/solution/backend/cmcs_regulations/settings/deploy.py index 8419ad61cc..fea81526b1 100644 --- a/solution/backend/cmcs_regulations/settings/deploy.py +++ b/solution/backend/cmcs_regulations/settings/deploy.py @@ -14,7 +14,7 @@ **default_database_values, 'NAME': os.environ.get('DB_NAME', 'eregs'), 'OPTIONS': { - 'connect_timeout': 20, + 'connect_timeout': 10, }, }, 'postgres': { diff --git a/solution/backend/serverless.yml b/solution/backend/serverless.yml index d33c1b9499..5947999307 100644 --- a/solution/backend/serverless.yml +++ b/solution/backend/serverless.yml @@ -251,6 +251,7 @@ resources: Family: aurora-postgresql15 Parameters: rds.force_ssl: 1 + statement_timeout: 10000 # Required for ATO compliance AuroraRDSInstanceParameter15: Type: AWS::RDS::DBParameterGroup @@ -272,7 +273,7 @@ resources: random_page_cost: 1 track_activity_query_size: 16384 idle_in_transaction_session_timeout: 7200000 - statement_timeout: 20000 + statement_timeout: 10000 # Required for ATO compliance search_path: '"$user",public' log_hostname: 1 pgaudit.role: "rds_pgaudit"