How to disable default AWS Lambda logging?

Viewed 352

AWS Lambda unfortunately logs rather a log of the following lines:

START RequestId: 9becdd00-2f91-4841-97d7-d1b8eddbcd5c Version: $LATEST
END RequestId: 9becdd00-2f91-4841-97d7-d1b8eddbcd5c
REPORT RequestId: 9becdd00-2f91-4841-97d7-d1b8eddbcd5c  Duration: 5709.73 ms    Billed Duration: 5710 ms    Memory Size: 256 MB Max Memory Used: 106 MB Init Duration: 556.64 ms

Is there a way to disable these without affecting the underlying logging code or at least lower the logging levels? We have quite a few Lambdas and they're very noisy.

1 Answers

You have to remove permissions logs:CreateLogGroup, logs:CreateLogStream and logs:PutLogEvents from your lambda execution role.

Related