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 Antwort
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
EXPERTE
beantwortet vor einem Jahr
profile pictureAWS
EXPERTE
Uri
überprüft vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen