Skip to content

Commit

Permalink
fix: change defaultNextLambda removalPolicy from DESTROY to RETAIN (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jlegreid committed Apr 20, 2022
1 parent f5c33ac commit 1baa444
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1250,14 +1250,14 @@ Object {
"Type": "AWS::CloudFront::CachePolicy",
},
"StackNextLambdaCurrentVersion21F01F879970bafa5c9141f6152d4057c3ab8184": Object {
"DeletionPolicy": "Delete",
"DeletionPolicy": "Retain",
"Properties": Object {
"FunctionName": Object {
"Ref": "StackNextLambdaF64DCE99",
},
},
"Type": "AWS::Lambda::Version",
"UpdateReplacePolicy": "Delete",
"UpdateReplacePolicy": "Retain",
},
"StackNextLambdaCurrentVersionAliasliveB07D2AA0": Object {
"Properties": Object {
Expand Down Expand Up @@ -2999,14 +2999,14 @@ Object {
"Type": "AWS::CloudFront::CachePolicy",
},
"StackNextLambdaCurrentVersion21F01F87b5875487743b0e6b4f7058e417862406": Object {
"DeletionPolicy": "Delete",
"DeletionPolicy": "Retain",
"Properties": Object {
"FunctionName": Object {
"Ref": "StackNextLambdaF64DCE99",
},
},
"Type": "AWS::Lambda::Version",
"UpdateReplacePolicy": "Delete",
"UpdateReplacePolicy": "Retain",
},
"StackNextLambdaCurrentVersionAliasliveB07D2AA0": Object {
"Properties": Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class NextJSLambdaEdge extends Construct {
description: `Default Lambda@Edge for Next CloudFront distribution`,
handler: props.handler || "index.handler",
currentVersionOptions: {
removalPolicy: RemovalPolicy.DESTROY // destroy old versions
removalPolicy: RemovalPolicy.RETAIN // retain old versions to prevent premature removal, cleanup via trigger later on
},
logRetention: logs.RetentionDays.THREE_DAYS,
code: lambda.Code.fromAsset(
Expand Down

0 comments on commit 1baa444

Please sign in to comment.