# Access Denied error with s3 plugin

**URL:** <https://discuss.elastic.co/t/access-denied-error-with-s3-plugin/95233>\
**Category:** Logstash\
**Created:** [July 31, 2017, 7:26pm UTC](https://discuss.elastic.co/t/access-denied-error-with-s3-plugin/95233 "2017-07-31T19:26:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![desai.amogh](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@desai.amogh](https://discuss.elastic.co/u/desai.amogh)\
**Post date:** [July 31, 2017, 7:26pm UTC](https://discuss.elastic.co/t/access-denied-error-with-s3-plugin/95233/1 "2017-07-31T19:26:57Z")

</div>

I am trying to use the s3 plugin and I get below error:

```
 [[main]<s3] ERROR logstash.pipeline - A plugin had an unrecoverable error. Will restart this plugin.
  Plugin: <LogStash::Inputs::S3 bucket=>"xxxxxx", access_key_id=>"xxxxxxxxxxxx", secret_access_key=>"xxxxxxxxxxxxxxxxx/xxxx", delete=>false, codec=><LogStash::Codecs::CloudTrail id=>"cloudtrail_c79a87d9-s7t5-435a-a3ss-eecd3978526f", enable_metric=>true, charset=>"UTF-8">, type=>"AWS-cloudtrail", temporary_directory=>"/usr/share/logstash/data/", interval=>60, id=>"aace806f9c895bd9683b2bc8d4183df5e567df2d-11", enable_metric=>true, region=>"us-east-1">
  Error: Access Denied

```

This is my input:

```
 s3 {
   bucket => "xxxxxxxx"
   access_key_id => "xxxxxxxxxx"
   secret_access_key => "xxxxxx/xx"
   region => "us-east-1"
   prefix => "AWSLogs/xxxxxxx/CloudTrail/us-east-1/"
   sincedb_path => "/usr/share/logstash/data/cloudtrail_s3_sincedb"
   delete => false
  # add_field => { source => gzfiles }
   codec => "cloudtrail"
   type => "AWS-cloudtrail"
   temporary_directory => "/usr/share/logstash/data/"
   interval => 60
  }

```

Have tried commenting region, sincedb, temp path.  
Tried giving full access on those directories, also tried commenting codec.  
Access key im using has full access to S3 (not just that bucket.)

Please help.

---

<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:** [August 28, 2017, 7:27pm UTC](https://discuss.elastic.co/t/access-denied-error-with-s3-plugin/95233/2 "2017-08-28T19:27:19Z")

</div>

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