fledgling
fledgling

Reputation: 1051

Is it possible to stream all Cloudwatch logs to S3 or files in EC2?

I want to be able to export and stream all the Cloudwatch log groups or atleast stream a list of 50 log groups to S3. I have seen patterns with lambda where you stream a particular log group. Is there a way to do this for all the log groups or atleast a specific list of log groups?

Upvotes: 0

Views: 6868

Answers (1)

Paradigm
Paradigm

Reputation: 2026

Two options:

  1. You can export logs from the required log groups to S3 directly using CloudWatch: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3Export.html

  2. For real time processing of logs, you can define a subscription filter for the log groups using Lambda functions and store the data in S3 as required: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#LambdaFunctionExample

Upvotes: 1

Related Questions