aws_lambda: Add the ability to define a custom Function Log Group #30218
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
Lambda Function and CloudFormation templates support the ability to define a custom CloudWatch Log Group to send logs to. This functionality still does not exist in CDK
Use Case
It is frustrating to have to handle writing logs to a custom CloudWatch Log Group inline within lambda functions, when Lambda and CloudFormation has supported the ability to write to custom log groups for some time.
Proposed Solution
Add LoggingConfig as a variable when initializing the Function class
lambda = aws_lambda.Function( self, "my-function", code=..., logging_config={ log_group="my-loggroup } )
Other Information
No response
Acknowledgements
CDK version used
v2.141.0
Environment details (OS name and version, etc.)
linux, mac
The text was updated successfully, but these errors were encountered: