(lambda): Provide a way to specify a log group for a lambda function #11755
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
closing-soon
This issue will automatically close in 4 days unless further comments are made.
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Provide a way to specify a log group for a lambda function.
Use Case
In my environment, security policy prevents the deletion of log groups and streams by normal system operators.
When developing, it is common to deploy the lambda many times, and in this environment, that means every deployment creates a new log group.
I'd like to treat the log group in a logical way by saying "for this function, the logs are always at this location"
I do this by creating the log groups separately, as a high level system feature, then deploy applications that use them.
Proposed Solution
This is as of Typescript CDK version 1.75.0
Currently, CDK does allow you to retrieve log groups, but it does not allow you to set the retrieved group as the log group for the lambda function.
I suggest that the
Function
construct have an optional constructor parameter to set this.Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: