# Logstash s3 input plugin not deleting files after processing

**URL:** <https://discuss.elastic.co/t/logstash-s3-input-plugin-not-deleting-files-after-processing/259302>\
**Category:** Logstash\
**Created:** [December 21, 2020, 8:44pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-deleting-files-after-processing/259302 "2020-12-21T20:44:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcjay](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mcjay](https://discuss.elastic.co/u/mcjay)\
**Post date:** [December 21, 2020, 8:44pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-deleting-files-after-processing/259302/1 "2020-12-21T20:44:40Z")

</div>

I am using s3 input plugin on logstash to read AWS VPC flow logs from s3 bucket. I have this as my input.conf file

```auto
input {
s3 {
bucket => "vpc-flow-logs-elk"
prefix => "AWSLogs/200312345677/vpcflowlogs/us-east-1/"
region => "us-east-1"
delete => true
include_object_properties => true
interval => 10
type => "vpcflowlogs"
}
}

```

The files are being indexed. But not deleted after processing. I do have the **s3:DeleteObject** iam permissions and have tried manually deleting few files from the EC2 instance

`aws s3 rm s3://file_name works`

Not sure why logstash is not deleting the objects. How can i verify that? Can you please advise accordingly.

Thank you.

---

<div class="post-metadata">

**Author:** ![mcjay](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mcjay](https://discuss.elastic.co/u/mcjay)\
**Post date:** [December 29, 2020, 7:48pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-deleting-files-after-processing/259302/3 "2020-12-29T19:48:14Z")

</div>

The above code works. The s3 bucket had so many objects and hence it took a really long time to index them before deleting.

---

<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:** [January 26, 2021, 7:48pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-deleting-files-after-processing/259302/4 "2021-01-26T19:48:31Z")

</div>

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