# Logstash S3 output plugin fails if bucket name do not have a underscore (\_)

**URL:** <https://discuss.elastic.co/t/logstash-s3-output-plugin-fails-if-bucket-name-do-not-have-a-underscore/136826>\
**Category:** Logstash\
**Created:** [June 21, 2018, 10:27am UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-fails-if-bucket-name-do-not-have-a-underscore/136826 "2018-06-21T10:27:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thnitendra](https://avatars.discourse-cdn.com/v4/letter/t/da6949/32.png) [@thnitendra](https://discuss.elastic.co/u/thnitendra)\
**Post date:** [June 21, 2018, 10:27am UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-fails-if-bucket-name-do-not-have-a-underscore/136826/1 "2018-06-21T10:27:43Z")

</div>

I am using logstash s3 output plugin to upoad files on ganesha s3 buckets.  
I must include an underscore in the bucket name to make the logstash S3 output plugin work.  
If there is no underscore, I get this error:  
:error=\>"Logstash must have the privileges to write to root bucket `applogs`, check your credentials or your permissions."

This error is misleading becasue I know I can access (read, write) the buckets using s3 cli.

My S3 output configuration is:  
s3 {  
access\_key\_id =\> "XXXXXXXX"  
secret\_access\_key =\> "XXXXXXXXX"  
region =\> "us-east-1"  
endpoint =\> "[https://s3-ganesha.local](https://s3-ganesha.local)"  
bucket =\> "applogs"  
additional\_settings =\> {  
"force\_path\_style" =\> true  
}  
}

I started logstash in debug mode; but, could not get any pointers.

I am using logstash logstash:5.6.9 docker image

The same above configuration will work if I change the bucket name to "app\_logs" instead

---

<div class="post-metadata">

**Author:** ![kylegordon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kylegordon/32/17575_2.png) [@kylegordon](https://discuss.elastic.co/u/kylegordon)\
**Post date:** [June 21, 2018, 2:57pm UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-fails-if-bucket-name-do-not-have-a-underscore/136826/2 "2018-06-21T14:57:06Z")

</div>

I've only used the S3 input plugin, but afaics it doesn't need the endpoint parameter. Do you really need it?

When AWS compose a domain name for buckets, they use the SSL cert for \*.amazonaws.com. I've found that if your bucket name has dots in it, and you hit, for example, [https://johnsmith.net.s3.amazonaws.com](https://johnsmith.net.s3.amazonaws.com), it will fail with a certificate error. If you change it to [https://johnsmith-net.s3.amazonaws.com](https://johnsmith-net.s3.amazonaws.com), it works just fine.

So, in short, it might be an SSL error due to the use of HTTPS and dots in your bucket name. My S3 input plugin is working just fine with a dot in the bucket name, but I don't specify an endpoint.

---

<div class="post-metadata">

**Author:** ![thnitendra](https://avatars.discourse-cdn.com/v4/letter/t/da6949/32.png) [@thnitendra](https://discuss.elastic.co/u/thnitendra)\
**Post date:** [June 22, 2018, 5:58am UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-fails-if-bucket-name-do-not-have-a-underscore/136826/3 "2018-06-22T05:58:35Z")

</div>

[https://s3-ganesha.local](https://s3-ganesha.local) is an internal local tool based on NetApp's DataGrid. So, in my case case, I am not connecting to the usual aws storage service. That's why I have to explicitly set the endpoint.

bucket name do not have a dots in it.

---

<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:** [July 20, 2018, 5:58am UTC](https://discuss.elastic.co/t/logstash-s3-output-plugin-fails-if-bucket-name-do-not-have-a-underscore/136826/4 "2018-07-20T05:58:39Z")

</div>

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