- Newest
- Most votes
- Most comments
Hi,
You have a detailled walk-through of the entire process to export from logs from CloudWatch to S3 at https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasksConsole.html
This page will also provide you with some advanced options:
- export those logs in an encrypted form
- export the logs in a S3 bucket located in another account
You can than zip those logs via AWS CloudShell to avoid the setup of any compute resource (ECS/Fargeate), EC2) : zip is part of pre-installed utilities in CloudShell. See https://docs.aws.amazon.com/cloudshell/latest/userguide/multiple-files-upload-download.html.
With the zip/unzip utilities, you can compress multiple files in an archive that can be
treated as a single file. The utilities are pre-installed in the CloudShell compute environment.
Alternatively, you may want to give a try to AWS CloudWatch Log Insights to directly analyze your logs in place (i.e. in CloudWatch) and finally extract the minimum number of most interesting records. This video will show you how: https://www.youtube.com/watch?v=2s2xcwm8QrM
Best,
Didier
is there any option we can moved cloudwatch logs in to s3 and then we can read these logs same way as we query in cloudwatch insight ?
Relevant content
- Accepted Answerasked 2 years ago
- asked 9 months ago
- asked 8 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
Hi Didier, As far as I can understand, this implementation is straightforward and valid when we just need to export logs once. However, using this approach, I cannot move CloudWatch logs to S3 in an automatic way. By leveraging a Lambda function and event bridge trigger I think that the process of exporting a CloudWatch log group to an S3 bucket could be easily automated. What do you think? Is there any existing implementation (cloudformation template) for this purpose?