# Invalid Config with S3

**URL:** <https://discuss.elastic.co/t/invalid-config-with-s3/61531>\
**Category:** Logstash\
**Created:** [September 26, 2016, 7:11pm UTC](https://discuss.elastic.co/t/invalid-config-with-s3/61531 "2016-09-26T19:11:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allie\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/allie_yang/32/16538_2.png) [@Allie\_Yang](https://discuss.elastic.co/u/Allie_Yang)\
**Post date:** [September 26, 2016, 7:11pm UTC](https://discuss.elastic.co/t/invalid-config-with-s3/61531/1 "2016-09-26T19:11:25Z")

</div>

I am configuring to read from s3 like below:  
input {  
s3 {  
access\_key\_id =\> "**"  
secret\_access\_key =\> "**\*\*\*\*\*\*\*\*"  
bucket =\> "fotolia-prod-logs"  
region =\> "eu-west-1"  
type =\> "syslog"  
delete =\> false  
}  
}

But get invalid config error from s3 part:  
fetched an invalid config {:config=\>"input {\n s3 {\n access\_key\_id =\> "ASIAIK7HB5C7TJIDRYXA"\n secret\_access\_key =\> "Uyr5uU307vUrQVWtRdqu5ykFIm+S+ttnlE7hn54L"\n bucket =\> "fotolia-prod-logs"\n region =\> "eu-west-1"\n type =\> "syslog"\n delete =\> false\n}\n}\n\n\nfilter {\n grok{\n break\_on\_match =\> false \n match =\> { "message" =\> "%{SYSLOGBASE} %{GREEDYDATA:message}" }\n overwrite =\> ["message"] \n} \n}\n\n\noutput {\n stdout { codec =\> rubydebug }\n}\n\n", :reason=\>"Expected one of #, ", ', } at line 3, column 1 (byte 17) after input {\n s3 {\n", :level=\>:error}

**Should I specify a prefix?** But the prefix are all different, like 2016/01/event\_log/generic.log; 2015/10/event\_log/generic.log. etc..

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 26, 2016, 8:05pm UTC](https://discuss.elastic.co/t/invalid-config-with-s3/61531/2 "2016-09-26T20:05:47Z")

</div>

**If you just posted your secret access key I suggest you revoke it.**

The error message indicates a problem at the beginning of line 3. Perhaps you have some non-printable garbage character there?

> Should I specify a prefix?

The `prefix` option is not mandatory. Even if it were, its absence wouldn't result in this error message.

---

<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 6, 2017, 4:36am UTC](https://discuss.elastic.co/t/invalid-config-with-s3/61531/4 "2017-07-06T04:36:45Z")

</div>


