Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Error Metrics in AWS Lambda but can't find any error in logs

In AWS Lambda, I can see errors in the cloud watch metrics sometimes, but when I check the logs for the logs, I don't see any error. Does the AWS Lambda don't log the errors automatically?

like image 762
hatellla Avatar asked Feb 03 '26 04:02

hatellla


1 Answers

Make sure your Lambda function's execute role has the permissions logs:CreateLogGroup, logs:CreateLogStream and logs:PutLogEvents. A good way to do this is to grant the built-in policy AWSLambdaBasicExecutionRole to your Lambda function's execution role.

like image 135
rangfu Avatar answered Feb 04 '26 19:02

rangfu