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 個回答
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
專家
已回答 1 年前
profile pictureAWS
專家
Uri
已審閱 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南