Group Lambda Logs

0

Hello everyone!

Im using AWS CDK Library to deploy stacks.

I want to know if there is a way to save lambda logs in a group log in order to dont see many logs in cloud watch.

And, does this lambda logs create many resources from cloudformation?

Thanks

1 Answer
2

Unfortunately, it would be difficult to combine the logs of multiple Lambda functions in one log group.
As described in the following document, the log group is defined as "/aws/lambda/<YourLambdaFunctionName>" and it does not seem to be possible to change this.
https://docs.aws.amazon.com/prescriptive-guidance/latest/implementing-logging-monitoring-cloudwatch/lambda-logging-metrics.html#lambda-function-logging

Lambda automatically creates a log group when your Lambda function is first invoked. Lambda functions can have multiple versions and you can choose the version that you want to run. All logs for the Lambda function's invocations are stored in the same log group. The name cannot be changed and is in the /aws/lambda/<YourLambdaFunctionName> format. A separate log stream is created in the log group for each Lambda function instance. Lambda has a standard naming convention for log streams that uses a YYYY/MM/DD/[<FunctionVersion>]<InstanceId> format. The InstanceId is generated by AWS to identify the Lambda function instance.

profile picture
EXPERT
answered 10 months ago
profile pictureAWS
EXPERT
Uri
reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions