Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Import Logs From An Amazon S3 Bucket to cloudwatch

I have Exported the aws cloudwatch Log Data to Amazon S3 Using the AWS CLI. Followed kb: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasks.html.

Any idea how we can import the logs saved in s3 for analysing the data?

like image 606
manu thankachan Avatar asked Jun 18 '19 13:06

manu thankachan


Video Answer


1 Answers

Well, for data analysing I would recommend using Athena,

Regarding your comments a quick search was not able to provide an answer on how to import logs.

Logs are attached to resources that you spin up, so it sounds kind of impossible to attach logs from a newly generated cluster to the old cluster when it is up, since they are two separate resources with different unique id's etc.

Logs are stored in cloudwatch don't have an expiry date even if the resource is deleted. So you would still be able to check the logs of the newly generated cluster when it is no longer online (destroyed) export the logs to s3 and analyse them using Athena.

like image 133
kldnz Avatar answered Sep 18 '22 19:09

kldnz