# Incorrect S3 warning in admin menu

**URL:** https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496
**Category:** Bug
**Created:** [December 29, 2020, 2:02pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496 "2020-12-29T14:02:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [December 29, 2020, 2:02pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496/1 "2020-12-29T14:02:23Z")

</div>

There is a possible bug in the warning being displayed on the admin menu of Discourse 2.7.0.beta1 ( [53f4d54f23](https://github.com/discourse/discourse/commits/53f4d54f23ab8a4ba2e795ada5246dd7e07452d9))

The warning reads:

> - The server is configured to upload files to S3, but at least one the following setting is not set: s3\_access\_key\_id, s3\_secret\_access\_key, s3\_use\_iam\_profile, or s3\_upload\_bucket. Go to [the Site Settings](https://example.com/%25%7Bbase_path%7D/admin/site_settings) and update the settings. [See “How to set up image uploads to S3?” to learn more](https://meta.discourse.org/t/how-to-set-up-image-uploads-to-s3/7229).

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/2/b228e99c8ef879657ea450cd9d0196f3557ecb46.jpeg)

In my settings, the following _are_ set:

- s3\_access\_key\_id
- s3\_secret\_access\_key
- s3\_upload\_bucket

This one is _not_ set, and is probably triggering the warning:

- s3\_use\_iam\_profile

The details of this setting say:

> Use an [AWS EC2 instance profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) to grant access to the S3 bucket. NOTE: enabling this requires Discourse to be running in an appropriately-configured EC2 instance, and overrides the “s3 access key id” and “s3 secret access key” settings.

However, my Discourse is not running in an appropriately-configured EC2 instance so I therefore don’t want it to override the “s3 access key id” and “s3 secret access key” settings. My Discourse is running on Digital Ocean.

So this option, for me, is correctly not enabled.

Which I think means the warning displayed on the admin panel should _not_ be displayed in this scenario? 🤔

My S3 uploads are still working fine and have been for years with no changes made anywhere 👍🏻

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 29, 2020, 4:54pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496/2 "2020-12-29T16:54:36Z")

</div>

There is a new warning for people using S3 without a CDN that I merged yesterday. Looks like I got the error message wrong :facepalm:.

Will be fixed by

[https://github.com/discourse/discourse/pull/11603](https://github.com/discourse/discourse/pull/11603)

@Richie are you deliberately using S3 without a CDN? I added this warning because we got multiple topics in Meta about site admins paying way too much money for S3 because of the egress traffic costs.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [December 29, 2020, 5:27pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496/3 "2020-12-29T17:27:30Z")

</div>

> [@Falco](#):
>
> are you deliberately using S3 without a CDN?

My `s3 cdn url` setting is currently blank so yes, I probably am.

Thanks for the bug fix 👍🏻

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [December 29, 2020, 5:30pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496/4 "2020-12-29T17:30:49Z")

</div>

Although…

Does this mean the CDN warning will be visible all the time in the Discourse admin panel now instead?

Even if I choose never to set up a CDN? 🤔

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 29, 2020, 5:37pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496/5 "2020-12-29T17:37:26Z")

</div>

Yes, the idea is that using S3 without a CDN is a obvious mistake and everyone that is paying for S3 in a production instance can afford to pay for S3 **and** a CDN for less money.

One possible workaround if you are somehow stuck in S3 without a CDN is setting `s3 cdn url` to the bucket URL, so it becomes a noop.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [December 29, 2020, 5:40pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496/6 "2020-12-29T17:40:28Z")

</div>

Interesting.

Ok, thanks @Falco I’ll install the above fix over the next day or two and open a new #Support post if it get stuck 👍🏻

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 29, 2020, 5:40pm UTC](https://meta.discourse.org/t/incorrect-s3-warning-in-admin-menu/174496/7 "2020-12-29T17:40:37Z")

</div>


