As one of the steps for the previous problem I've faced, I need to see the logs for some Lambda@Edge but I cannot find them anywhere.
According to the documentation on Lambda@Edge:
When you review CloudWatch log files or metrics when you're troubleshooting errors, be aware that they are displayed or stored in the Region closest to the location where the function executed. So, if you have a website or web application with users in the United Kingdom, and you have a Lambda function associated with your distribution, for example, you must change the Region to view the CloudWatch metrics or log files for the London AWS Region.
The lambda function I'm trying to find the logs for is located in us-east-1
(mandated by CloudFront since it is used as a distribution's event handler) while I'm in Canada so I assume the closest region would be ca-central-1
. But since I'm not developing in ca-central-1
, I don't have any log groups in that region. In any case, I don't see the logs for my Lambda@Edge. For the sake of completeness, I checked all the regions and I couldn't find any trace of logs for the lambda function. To be clear, I'm looking for a log group with the lambda function's name.
I'm positive that there should be logs since I have console.log()
in my code and also I can download the content requested (the lambda function is in charge of selecting the S3 bucket holding the contents) which means the lambda function was successfully executed. If it wasn't, I should have not been able to get the S3 content.
Where can I find the logs for my Lambda@Edge function?