Are we able to export only parts of the Amazon CloudWatch logs to Amazon S3?

0

A customer wants to export only parts of the logs from CloudWatch to S3, is there a way to do that?

Reason is that the logGroup is very big and they are only interested in the data for the last months.

Is there a way from AWS to delete older log streams periodically? To save some costs on storage?

1개 답변
0
수락된 답변

The pattern you describe is quite common, what you want to do is create a subscription filter for your cloudwatch log group.

Ideally this is the pattern [CW Log Group Filter] -->[Kinesis Firehose] -->[Delivery Stream] -->[S3]

Read the following guide for an example:

https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#FirehoseExample

As to your question on a way to periodically delete log streams, CW Log Group retention periods are configurable between 1 day up to 10 years.

Bruno_M
답변함 4년 전
  • is it mandatory to use both kinesis firehose and datastreams or can we achieve by using one to save cost?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠