# Allow use of AWS EC2 IAM roles with S3 file/image uploads

**URL:** <https://meta.discourse.org/t/allow-use-of-aws-ec2-iam-roles-with-s3-file-image-uploads/17197>\
**Category:** Feature\
**Tags:** pr-welcome\
**Created:** [Julho 4, 2014, 3:54am UTC](https://meta.discourse.org/t/allow-use-of-aws-ec2-iam-roles-with-s3-file-image-uploads/17197 "2014-07-04T03:54:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![windhamg1](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@windhamg1](https://meta.discourse.org/u/windhamg1)\
**Post date:** [Julho 4, 2014, 3:54am UTC](https://meta.discourse.org/t/allow-use-of-aws-ec2-iam-roles-with-s3-file-image-uploads/17197/1 "2014-07-04T03:54:09Z")

</div>

I deployed the official Docker Discourse image on an AWS EC2 instance, assuming I could use the Access Key/Secret Key associated an IAM role to enable Discourse’s S3 upload feature (under Setting-\>Files)…well, I guess you know what that makes me. 😄 For reference:  
[https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229/31?u=windhamg1](https://meta.discourse.org/t/setting-up-file-and-image-uploads-to-s3/7229/31)

As the “fog” gem (used by Discourse for S3 support) has the ability to use the keys from an IAM role, I respectfully submit a request to have Discourse use this option (:use\_iam\_profile =\> true) if the “use S3” option is enabled, but the “Access Key ID” and “Secret Key” fields are left blank.

Thank you!

---

_[View the full topic](https://meta.discourse.org/t/allow-use-of-aws-ec2-iam-roles-with-s3-file-image-uploads/17197)._
