-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@aws-cdk/integ-tests-alpha: SingletonFunctions used for test assertions should set a CloudWatch log group retention policy #29260
Comments
I guess this is because by default lambda.Function will create a built-in log group that never expires unless a custom loggroup is specified here. Yes it would be great to have the log retention policy support for that. |
…tack (#29277) ### Issue # (if applicable) Closes #29260 ### Reason for this change CloudWatch log groups created by the integ tests are set to never expire, so end up cluttering up your aws account and need manual cleanup. ### Description of changes Added custom log group with log group retention ### Description of how you validated changes All existing tests and new tests pass. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the feature
Currently if you perform a test like
The stack deletes itself after a test, but CloudWatch log groups named like
and are set to never expire, so end up cluttering up your aws account and need manual cleanup.
Use Case
Test results are not needed forever and should have some default retention policy, or at least a way to set them.
Proposed Solution
Include a default retention policy for
SingletonFunction
CloudWatch log groups.Other Information
nodejs dependencies:
Acknowledgements
CDK version used
2.129.0
Environment details (OS name and version, etc.)
Mac. Node 20. cdk 2.129.0
The text was updated successfully, but these errors were encountered: