Skip to content

Commit

Permalink
OK-356 Päivitetty lambdojen lokien retentio
Browse files Browse the repository at this point in the history
  • Loading branch information
jkorri committed Jan 27, 2024
1 parent 81b014e commit a65761a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cdk/lib/persistenssi-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import * as lambda from "aws-cdk-lib/aws-lambda";
import path = require("path");
import * as iam from "aws-cdk-lib/aws-iam";
import {Effect} from "aws-cdk-lib/aws-iam";
import {RetentionDays} from "aws-cdk-lib/aws-logs";

interface ViestinValitysStackProps extends cdk.StackProps {
environmentName: string;
Expand Down Expand Up @@ -162,7 +163,8 @@ export class PersistenssiStack extends cdk.Stack {
DB_HOST: `viestinvalitys.db.${publicHostedZones[props.environmentName]}`,
},
vpc,
securityGroups: [postgresAccessSecurityGroup]
securityGroups: [postgresAccessSecurityGroup],
logRetention: RetentionDays.TWO_YEARS,
})

/**
Expand Down
3 changes: 2 additions & 1 deletion cdk/lib/sovellus-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as sns_subscriptions from 'aws-cdk-lib/aws-sns-subscriptions';
import * as ses from 'aws-cdk-lib/aws-ses';
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
import * as shield from 'aws-cdk-lib/aws-shield';
import * as wafv2 from 'aws-cdk-lib/aws-wafv2';
import {RetentionDays} from "aws-cdk-lib/aws-logs";
import path = require("path");

interface ViestinValitysStackProps extends cdk.StackProps {
Expand Down Expand Up @@ -247,6 +247,7 @@ export class SovellusStack extends cdk.Stack {
securityGroups: securityGroups,
logFormat: 'JSON',
applicationLogLevel: 'INFO',
logRetention: RetentionDays.TWO_YEARS,
})

// SnapStart
Expand Down

0 comments on commit a65761a

Please sign in to comment.