# Logstash S3 Input Plugin not recognizing IAM Instance Profile

**URL:** <https://discuss.elastic.co/t/logstash-s3-input-plugin-not-recognizing-iam-instance-profile/259812>\
**Category:** Logstash\
**Created:** [December 29, 2020, 4:28pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-recognizing-iam-instance-profile/259812 "2020-12-29T16:28:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [December 29, 2020, 8:53pm UTC](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-recognizing-iam-instance-profile/259812/2 "2020-12-29T20:53:50Z")

</div>

Related Thread ans Issue

> [@IAM credentials not recognised/used for s3 - plugins used input-s3 + codec-cloudtrail](https://discuss.elastic.co/t/iam-credentials-not-recognised-used-for-s3-plugins-used-input-s3-codec-cloudtrail/32464):
>
> Hi, Scenario is I am trying to use Logstash to: -pull AWS CloudTrail '.json.gz' logs from an S3 bucket using [logstash-input-s3](https://rubygems.org/gems/logstash-input-s3) plugin -process them using the [logstash-codec-cloudtrail](https://rubygems.org/gems/logstash-codec-cloudtrail) plugin -send them to Elasticsearch using standard output. The installation itself is a standard RPM installation of [logstash-1.5.4-1.noarch.rpm](https://download.elastic.co/logstash/logstash/packages/centos/logstash-1.5.4-1.noarch.rpm) with 'logstash-codec-cloudtrail' installed afterward. Otherwise vanilla. The credentials (ACCESS\_KEY + SECRET\_KEY) used exist in the same account as the s3 bucket, an…

> <https://github.com/logstash-plugins/logstash-input-s3/issues/60>
>
> This was initially reported in a Discuss thread \[here\](https://discuss.elastic.c…o/t/iam-credentials-not-recognised-used-for-s3-plugins-used-input-s3-codec-cloudtrail/32464).
> 
> Config;
> 
> \`\`\`
> input {
> s3 {
> bucket =\> "mybucketname-logs-cloudtrail"
> access\_key\_id =\> "ACCESS\_KEY\_HERE"
> secret\_access\_key =\> "SECRET\_KEY\_HERE"
> region =\> "eu-west-1"
> codec =\> "cloudtrail"
> type =\> "cloudtrail"
> prefix =\> "AWSLogs/AWS\_ACCOUNT\_ID\_HERE/CloudTrail/eu-west-1/2015/09/27"
> temporary\_directory =\> "/tmp/temp-cloudtrail\_s3\_temp"
> sincedb\_path =\> "/tmp/temp-cloudtrail\_s3\_sincedb"
> debug =\> "true"
> }
> }
> output {
> elasticsearch {
> host =\> "ELASTICSEARCH\_URL\_HERE"
> protocol =\> "http"
> }
> stdout {
> codec =\> "rubydebug"
> }
> }
> \`\`\`
> 
> There's some debug logging \[here\](http://pastebin.com/cw6BpnhR) as well.
> 
> I hope the discuss thread and this gives you a good idea of the situation, but let me know if my summary sucks :)

---

_[View the full topic](https://discuss.elastic.co/t/logstash-s3-input-plugin-not-recognizing-iam-instance-profile/259812)._
