- Newest
- Most votes
- Most comments
You can view your AWS Lambda logs in CloudWatch through several methods:
Using the Lambda Console:
- Open the Lambda console
- Navigate to your function
- Check the "Monitor" tab
- View execution results in the logs section
- When testing your function, you can also see logs in the "Details" section
Using the CloudWatch Console:
- Open the CloudWatch console
- Go to the "Log groups" page
- Find and select the log group for your function (typically named "/aws/lambda/your-function-name")
- Choose a log stream to view detailed logs (each stream corresponds to an instance of your function)
Using the AWS CLI:
You can retrieve logs using the AWS Command Line Interface with the --log-type Tail command option and decode the logs using the base64 utility.
By default, Lambda automatically captures logs for all function invocations and sends them to CloudWatch Logs, provided your function's execution role has the necessary permissions. Your function's logs are stored in a log group named "/aws/lambda/function-name".
Note that there might be a delay of 5-10 minutes before logs appear in CloudWatch after function execution.
Sources
Viewing CloudWatch logs for Lambda functions - AWS Lambda
Log and monitor Go Lambda functions - AWS Lambda
Log and monitor Node.js Lambda functions - AWS Lambda
Sending Lambda function logs to CloudWatch Logs - AWS Lambda
Relevant content
- asked 9 months ago
- AWS OFFICIALUpdated a year ago
