Can't get AWS Lambda function to log (text output) to CloudWatch

后端 未结 15 540
独厮守ぢ
独厮守ぢ 2020-12-13 12:14

I\'m trying to set up a Lambda function that will process a file when it\'s uploaded to an S3 bucket. I need a way to see the output of console.log when I uploa

15条回答
  •  悲&欢浪女
    2020-12-13 12:31

    Though this got answered already, Just wanted to add my experience which might be useful for others.

    Even the permissions are set appropriately so that lambda can log in cloudwatch, sometimes it is taking 3-4 hrs to reflect the log groups.

    In my case when using lambda for DynamoDB events, where lambda was given all needed permissions for both cloudwatch and DynamoDB. It took 4 hrs to get the logs reflected. May be some sync issues from AWS end. After 4 hrs without any action from my end, I was able to see the Cloudwatch logs.

    Also make sure that you are seacrching the logs in the same region where your function is created.

提交回复
热议问题