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
전문가
답변함 일 년 전
profile pictureAWS
전문가
Uri
검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠