- Newest
- Most votes
- Most comments
The solution would depend on how quickly you needed the CloudWatch Logs to be exported to S3.
If you can run on a schedule, say every 4 or 5 hours, I'd suggest the solution listed in the article you suggested, but rather than triggering the log exports directly from the initial lambda, use the initial lambda to publish a message to SNS with details of the log group to be exported and then poll the SQS to retrieve the details and export that group. Configure the poller to retrieve the messages individually with a polling period set appropriately to ensure the exports are completed before the next message in the queue is completed.
If you want more immediate exports (bearing in mind this will create more objects in s3), look at creating a subscription filter on the cloudwatch log group (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html), then feeding into the solution above i.e. calling a lambda to publish the results to sns and then process in the same way.
Relevant content
- asked 8 months ago
- asked 5 years ago
- asked 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago