# Logstash-s3-output plugin not working without s3:deleteObject permission

**URL:** <https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-without-s3-deleteobject-permission/154875>\
**Category:** Logstash\
**Created:** [October 31, 2018, 3:49pm UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-without-s3-deleteobject-permission/154875 "2018-10-31T15:49:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnold\_Kell](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@Arnold\_Kell](https://discuss.elastic.co/u/Arnold_Kell)\
**Post date:** [October 31, 2018, 3:49pm UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-without-s3-deleteobject-permission/154875/1 "2018-10-31T15:49:16Z")

</div>

Logstash output would not work for me without s3:deleteObject permission although as I understand, only the s3:putObject permission is required for the plugin to work properly. Without the s3:deleteObject an xml file appeared in my s3 bucket, named logstash-programmatic-access-test-object with the date also in the title. It contained the following:

\<Error\>

\<Code\>AccessDenied\</Code\>

\<Message\>Access Denied\</Message\>

\<RequestId\>9780FA73485EE2D4\</RequestId\>

\<HostId\>

DV6x0Dj2ucz/Ziv1uHeW413J/za9fMgtaEOi5MKIy17777Dey4M4OcXK+x0jUCc0w2yu3axm5WA=

\</HostId\>

\</Error\>

Could this possibly be a bug in the plugin? Or have I misunderstood something? Thanks!

---

<div class="post-metadata">

**Author:** ![\_Alex](https://avatars.discourse-cdn.com/v4/letter/_/54ee81/32.png) [@\_Alex](https://discuss.elastic.co/u/_Alex)\
**Post date:** [October 31, 2018, 4:38pm UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-without-s3-deleteobject-permission/154875/2 "2018-10-31T16:38:17Z")

</div>

It looks like _you_ don't have permission to view that object in S3. Can you download it, or make it public and then attempt to view?

EDIT: The relevant code in the plugin is here: [https://github.com/logstash-plugins/logstash-output-s3/blob/23a4f71864f0127a4d52f23a04cdf0a35d41566c/lib/logstash/outputs/s3/write\_bucket\_permission\_validator.rb#L30](https://github.com/logstash-plugins/logstash-output-s3/blob/23a4f71864f0127a4d52f23a04cdf0a35d41566c/lib/logstash/outputs/s3/write_bucket_permission_validator.rb#L30)

It looks like that object is simply a test object, which gets created to ensure PutObject works, and then (tries) to delete it, but as the comment on that function says, it carrys on if it fails to delete as only Put is required.

---

<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 28, 2018, 4:38pm UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-not-working-without-s3-deleteobject-permission/154875/3 "2018-11-28T16:38:21Z")

</div>

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