# How to start parsing AWS load balancer logs from specified date

**URL:** <https://discuss.elastic.co/t/how-to-start-parsing-aws-load-balancer-logs-from-specified-date/152711>\
**Category:** Logstash\
**Created:** [October 16, 2018, 7:25pm UTC](https://discuss.elastic.co/t/how-to-start-parsing-aws-load-balancer-logs-from-specified-date/152711 "2018-10-16T19:25:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitish](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@nitish](https://discuss.elastic.co/u/nitish)\
**Post date:** [October 16, 2018, 7:25pm UTC](https://discuss.elastic.co/t/how-to-start-parsing-aws-load-balancer-logs-from-specified-date/152711/1 "2018-10-16T19:25:18Z")

</div>

AWS LB logs are stored in S3 bucket at **AWSLogs/xxxxxxxxx/elasticloadbalancing/region/2018/10/16/\<log\_files\>**. I want to skip old logs and start parsing from start of this month.  
Setting prefix **AWSLogs/xxxxxxxxx/elasticloadbalancing/region/2018/10** will temporarily solve my problem but prefix will change at the start of next month. I am using **exclude\_pattern =\> "/\*dev-test\*"** to skip dev and test logs. ELK version: 6.4.0

---

<div class="post-metadata">

**Author:** ![nitish](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@nitish](https://discuss.elastic.co/u/nitish)\
**Post date:** [October 19, 2018, 10:53am UTC](https://discuss.elastic.co/t/how-to-start-parsing-aws-load-balancer-logs-from-specified-date/152711/2 "2018-10-19T10:53:51Z")

</div>

I have written a shell script to update the prefix to current date and set a cron job to execute it every day after midnight and restart logstash.

Please let me know if there is any better solution.

---

<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:** [November 16, 2018, 10:53am UTC](https://discuss.elastic.co/t/how-to-start-parsing-aws-load-balancer-logs-from-specified-date/152711/3 "2018-11-16T10:53:53Z")

</div>

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