-
Notifications
You must be signed in to change notification settings - Fork 175
Description
Summary
As part of our integration tests we deploy a number of AWS Lambda functions. For each one of these, we also create a LogGroup
.
Currently we are delegating the creation of this log group to AWS CDK and setting the log retention on this log group using the logRetention
property in the NodejsFunction
construct.
Up until a few months ago, this was the only method to set a log retention and it requires a CDK-managed custom resource to override the log retention after the resource is created.
With somewhat recent changes in CDK we can now specify the log retention when creating the log group, and tell the Lambda function to use this log group for its logging needs.
Why is this needed?
So that we can reduce the amount of resources deployed for each integration test run.
Which area does this relate to?
Tests
Solution
No response
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status