Skip to content

Commit eb18563

Browse files
committed
Set the log group removal policy to RETAIN
1 parent 0bdc6fd commit eb18563

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/cdk/constructs/LambdaFunction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class LambdaFunction extends Construct {
6262
encryptionKey: cloudWatchLogsKmsKey,
6363
logGroupName: `/aws/lambda/${props.functionName!}`,
6464
retention: props.logRetentionInDays,
65-
removalPolicy: RemovalPolicy.DESTROY
65+
removalPolicy: RemovalPolicy.RETAIN
6666
})
6767

6868
const cfnlogGroup = logGroup.node.defaultChild as CfnLogGroup

packages/cdk/constructs/RestApiGateway.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class RestApiGateway extends Construct {
5454
encryptionKey: cloudWatchLogsKmsKey,
5555
logGroupName: `/aws/apigateway/${props.stackName}-apigw`,
5656
retention: props.logRetentionInDays,
57-
removalPolicy: RemovalPolicy.DESTROY
57+
removalPolicy: RemovalPolicy.RETAIN
5858
})
5959

6060
new CfnSubscriptionFilter(this, "ApiGatewayAccessLogsSplunkSubscriptionFilter", {

0 commit comments

Comments
 (0)