lambda: apply data protection policy to generated log group #27598
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the feature
Currently there is no idiomatic way to apply a data protection policy to a log group that is automatically generated for a lambda.
It can be done but the solution is hacky -> by creating a log group with the assumed name that the lambda will use before the lambda creates the group. The lambda will then "Adopt" the log group you've made manually.
I believe it would be best if data protection policies can be applied to lambda generated log groups out-of-the-box.
Use Case
I am attempting to create a data protection policy for my CDK applicatio, but it is not easy to apply a data protection policy to log groups generated by lambda.
If this feature was implemented it would be very easy and natural to apply a data protection policy to a log group generated by a lambda.
Proposed Solution
I don't exactly know why this feature does not already exist but my assumption is the lambda life-cycles do not allow it normally.
My proposed solution is that when you're configuring a new lambda with a log group you can just apply a data protection policy to the configuration.
Other Information
No response
Acknowledgements
CDK version used
2.87.0
Environment details (OS name and version, etc.)
Mac, 13.5.2 (22G91)
The text was updated successfully, but these errors were encountered: