# Download avatars locally from S3 (shutting down S3 in my site)

**URL:** <https://meta.discourse.org/t/download-avatars-locally-from-s3-shutting-down-s3-in-my-site/174001>\
**Category:** Product Support\
**Created:** [December 22, 2020, 12:23pm UTC](https://meta.discourse.org/t/download-avatars-locally-from-s3-shutting-down-s3-in-my-site/174001 "2020-12-22T12:23:26Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

The discussion revolves around **downloading avatars locally from S3** before shutting it down due to high costs. [skozz](/t/-/174001/1) has a large community and wants to **keep user avatars** after disconnecting S3. They also aim to **disable image uploads** but **allow avatar uploads only**.

[skozz](/t/-/174001/1) has tried removing S3 credentials and found that some users still have their avatars, while others don't. [pfaffman](/t/-/174001/2) suggested using a **rake task for migrating uploads from S3 to local**, but [skozz](/t/-/174001/4) is unsure how to scope it to avatars only, as downloading all images from S3 would be costly.

[Falco](/t/-/174001/3) questioned whether [skozz](/t/-/174001/1) is using S3 without a CDN, which could be contributing to the high costs. [skozz](/t/-/174001/4) confirmed they are not using a CDN and will explore alternative options, such as using a CDN to reduce costs.

<div class="post-metadata">

**Author:** ![skozz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/skozz/32/119704_2.png) [@skozz](https://meta.discourse.org/u/skozz)\
**Post date:** [December 22, 2020, 12:23pm UTC](https://meta.discourse.org/t/download-avatars-locally-from-s3-shutting-down-s3-in-my-site/174001/1 "2020-12-22T12:23:26Z")

</div>

Hola! I tried for days to get the info I need searching in the Meta and internet without success.

### TD;DR

I´m shutting down S3 due to the costs. I would like to store the user avatars locally to avoid user losing their avatars before switching off S3.

### Background (long story short)

- I have a ~5 years old community. At the beginning storing images locally, and then switched to store them in S3.
- Today I have the discourse app in [forum.example.com](http://forum.example.com), and I migrating it to [example.com](http://example.com)
- In the process, I’m reducing the high costs (it is a huge community), and the main one is S3. We don’t care about losing the link to uploaded images to the posts, however, we would like to keep the user avatars.
- After migrating the forum to [example.com](http://example.com) I tried just removing the S3 credentials to see what happens. I found that part of the user still having their avatars, and others don’t

So, now I’m struggling to meet the following **goals** :

1. **Keep user avatars** after the S3 disconnection
2. Disable the upload images to the forum, but **allow ONLY upload avatars.**

Any input, idea or help will be very appreciated ❤

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [December 22, 2020, 3:56pm UTC](https://meta.discourse.org/t/download-avatars-locally-from-s3-shutting-down-s3-in-my-site/174001/2 "2020-12-22T15:56:54Z")

</div>

There is a rake task that you can search for [Migrating uploads from s3 to local](https://meta.discourse.org/t/migrating-uploads-from-s3-to-local/163903).

---

<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 22, 2020, 4:30pm UTC](https://meta.discourse.org/t/download-avatars-locally-from-s3-shutting-down-s3-in-my-site/174001/3 "2020-12-22T16:30:01Z")

</div>

> [@skozz](#):
>
> In the process, I’m reducing the high costs (it is a huge community), and the main one is S3.

Are you by any chance using S3 without a CDN? S3 should not be one of the main costs, unless it’s a extremely outlier community, if properly configured with a CDN fronting all traffic.

---

<div class="post-metadata">

**Author:** ![skozz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/skozz/32/119704_2.png) [@skozz](https://meta.discourse.org/u/skozz)\
**Post date:** [December 22, 2020, 5:13pm UTC](https://meta.discourse.org/t/download-avatars-locally-from-s3-shutting-down-s3-in-my-site/174001/4 "2020-12-22T17:13:43Z")

</div>

> [@Falco](#):
>
> Are you by any chance using S3 without a CDN? S3 should not be one of the main costs, unless it’s a extremely outlier community, if properly configured with a CDN fronting all traffic.

Good point. Nope, I’m not using a CND. Apart from the AWS, is there any other one commonly used by the community? I will start checking them asap.

> [@pfaffman](#):
>
> There is a rake task that you can search for [Migrating uploads from s3 to local](https://meta.discourse.org/t/migrating-uploads-from-s3-to-local/163903).

Thanks for sharing! however, I don’t know how to scope it only to avatars. If I run a download of all the images from S3, I’d need a mortgage 😛
