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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ