13
votes

It seems that I have a delay with the CloudWatch log of one of my lambda function's. I have a lambda function that gets triggered by a Kinesis stream. The lambda function writes records into a DynamoDB table.

I know for sure that the lambda function gets executed since I see new records in the DynamodDB table. But the CloudWatch log doesn't get updated. I waited for almost an hour and there is no update.

Also, permissions are good since I have older records in my log.

Any idea ?

1
Please mark the answer if it solved your problem or comment about it if not. Thanks.Efren

1 Answers

5
votes

CloudWatch does sometimes have a slight delay, but if you've waited an hour, it probably isn't going to show up. Double-check permissions to ensure they haven't changed. From the Lambda Management Console, do you still see "Amazon CloudWatch Logs" on the right as seen in the picture below?

enter image description here

If not, double check your security policy to make sure you have allowed CreateLogGroup, CreateLogStream, and PutLogEvents. Here is a snippet of a policy that includes the appropriate permissions.

"Statement": [
      {
        "Effect": "Allow",
        "Action": [
          "logs:CreateLogGroup",
          "logs:CreateLogStream",
          "logs:PutLogEvents"
        ],
        "Resource": "arn:aws:logs:*:*:*"
      }
    ]

Hope this helps!