Reputation: 1051
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
Reputation: 2026
Two options:
You can export logs from the required log groups to S3 directly using CloudWatch: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3Export.html
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