skip to Main Content

I dont have much code to show.

I want to process all cloudwatch logs that are generated in last 1 day using lambda.
I want to execute lambda 6 am in the morning to extract some information from cloudwatch logs that are generated on previous day and put it in a table.

2

Answers


  1. Instead of your 6 AM idea, you could also use a CloudWatch Logs subscription filter and trigger a Lambda function to process and store the log entries as described in a step-by-step example here Example 2: Subscription filters with AWS Lambda.

    Or even easier and without duplicating the data to a database: Analyzing log data with CloudWatch Logs Insights

    Login or Signup to reply.
  2. I assume that you have a lot of Lambda functions and each has a CloudWatch Log Group.

    You can try the CloudWatch Log Group subscription filter, with this feature you can stream your logs into any support destinations such as Lambda.

    cwlogs-subscription-filter-lambda

    Before that, you should prepare a Lambda function that has functionalities to help you to put your extracted data into DynamoDB table.

    References:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search