From 8936cb473964cbe1218a94f22c0b27e7ab3f50ed Mon Sep 17 00:00:00 2001 From: Rafael Leite <2132564+leite08@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:33:12 -0500 Subject: [PATCH] build: update RDS engine minor version + - update RDS engine minor version - add retain policy to RDS logs Ref. metriport/metriport-internal#1040 Signed-off-by: Rafael Leite <2132564+leite08@users.noreply.github.com> --- infra/lib/fhir-server-stack.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infra/lib/fhir-server-stack.ts b/infra/lib/fhir-server-stack.ts index deb9d92ab96..2b4ca92fe27 100644 --- a/infra/lib/fhir-server-stack.ts +++ b/infra/lib/fhir-server-stack.ts @@ -28,6 +28,7 @@ import { getConfig } from "./shared/config"; import { vCPU } from "./shared/fargate"; import { addDefaultMetricsToTargetGroup } from "./shared/target-group"; import { isProd, isSandbox, mbToBytes } from "./util"; +import { RetentionDays } from "aws-cdk-lib/aws-logs"; type Settings = { cpu: number; @@ -179,7 +180,7 @@ export class FHIRServerStack extends Stack { } const dbCluster = new rds.DatabaseCluster(this, "FHIR_DB", { engine: rds.DatabaseClusterEngine.auroraPostgres({ - version: rds.AuroraPostgresEngineVersion.VER_14_4, + version: rds.AuroraPostgresEngineVersion.VER_14_7, }), instanceProps: { vpc: this.vpc, @@ -191,6 +192,7 @@ export class FHIRServerStack extends Stack { storageEncrypted: true, parameterGroup, cloudwatchLogsExports: ["postgresql"], + cloudwatchLogsRetention: RetentionDays.ONE_YEAR, deletionProtection: true, removalPolicy: RemovalPolicy.RETAIN, });