# How filter Cloudwatch Logs Aws?

**URL:** <https://discuss.elastic.co/t/how-filter-cloudwatch-logs-aws/174638>\
**Category:** Logstash\
**Created:** [March 30, 2019, 1:57pm UTC](https://discuss.elastic.co/t/how-filter-cloudwatch-logs-aws/174638 "2019-03-30T13:57:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelicamaria](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@angelicamaria](https://discuss.elastic.co/u/angelicamaria)\
**Post date:** [March 30, 2019, 1:57pm UTC](https://discuss.elastic.co/t/how-filter-cloudwatch-logs-aws/174638/1 "2019-03-30T13:57:15Z")

</div>

Hello guys,

How do I make the filter take into account the records that are between START and END?

 ![CloudWatch%20Management%20Console%20-%20Google%20Chrome](https://us1.discourse-cdn.com/elastic/original/3X/a/d/ad681b90201c65245f276c785109d5a389c2992c.jpeg)

> I want to send to Elastic something as this:  
> {  
> "\_index": "pruebalog:07132017",  
> "\_type": "cloudwatch\_logs",  
> "\_id": "23334844787867677",  
> "\_score": null,  
> "\_source": {  
> "hostName": "AWS LOGS",  
> "appName": "LAMBDA",  
> "priority": "ERROR",  
> "@timestamp": "2019-03-25T15:50:55.000Z",  
> "message": {  
> "data": "{  
> Console Log #0  
> Console Log #1  
> Console Log #2  
> ...  
> ...  
> ...  
> }  
> }  
> },  
> "fields": {  
> "@timestamp": [  
> 12333333333333  
> ]  
> }  
> }

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 30, 2019, 2:08pm UTC](https://discuss.elastic.co/t/how-filter-cloudwatch-logs-aws/174638/2 "2019-03-30T14:08:00Z")

</div>

What do you want the result to be?

---

<div class="post-metadata">

**Author:** ![angelicamaria](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@angelicamaria](https://discuss.elastic.co/u/angelicamaria)\
**Post date:** [March 30, 2019, 2:56pm UTC](https://discuss.elastic.co/t/how-filter-cloudwatch-logs-aws/174638/3 "2019-03-30T14:56:10Z")

</div>

Friend, update the question, thanks for the help.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 30, 2019, 3:46pm UTC](https://discuss.elastic.co/t/how-filter-cloudwatch-logs-aws/174638/4 "2019-03-30T15:46:37Z")

</div>

That looks like a very good match for [Example 1](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html#plugins-filters-aggregate-example1) given in the documentation of the aggregate filter. You have a start event, and end event, and every line has a guid that can be used to correlate them.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 27, 2019, 3:46pm UTC](https://discuss.elastic.co/t/how-filter-cloudwatch-logs-aws/174638/5 "2019-04-27T15:46:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
