charlesperry
charlesperry

Reputation: 105

Where are S3/Redshift/Lambda Logs?

I have a Lambda, that copies data from Redshift to S3.

I am trying to find the logs in CloudWatch when I manually trigger the Lambda. I click logs and search under "log groups" and cannot see these.

I have enabled logs on Redshift and S3, and assume any Lambda generated has logs.

The end goal is to set up "log groups" per service so that I can subscribe through Kinesis and send the data to Redshift.

If I try to 'create a log group' under actions, I can create '/aws-s3/test' for example, but I don't know what log stream is, or how to send all S3 logs from a particular folder to S3.

Where are the logs?

Upvotes: 0

Views: 108

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 270114

The logs from the AWS Lambda function will be automatically created in Amazon CloudWach Logs.

However, you must ensure that the Lambda function has permission to use CloudWatch Logs.

This is normally done by assigning the AWSLambdaBasicExecutionRole managed policy to the AIM Role used by the Lambda function. It contains the permissions:

  • logs:CreateLogStream
  • logs:PutLogEvents

They will allow the Lambda function to create the log entries.

See: AWS Lambda Execution Role - AWS Lambda

Upvotes: 1

Related Questions