Created
November 1, 2019 06:39
-
-
Save mgjam/0f03b376593397aa75269f242c007fd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static createLogGroup( | |
scope: cdk.Construct, | |
lambdaFunction: lambda.Function | |
) { | |
new logs.LogGroup(scope, 'LogGroup', { | |
logGroupName: `/aws/lambda/${lambdaFunction.functionName}`, // Autogenerated log group name | |
retention: logs.RetentionDays.ONE_WEEK, | |
removalPolicy: cdk.RemovalPolicy.DESTROY | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment