# Best way to use AWS for temporary peer to peer file sharing?

**URL:** <https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581>\
**Category:** Databases\
**Tags:** s3, dynamodb, cognito\
**Created:** [March 20, 2021, 12:58pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581 "2021-03-20T12:58:18Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![LVermeulen](https://awshq.com/letter_avatar_proxy/v4/letter/l/b2d939/32.png) [@LVermeulen](https://awshq.com/u/LVermeulen)\
**Post date:** [March 20, 2021, 12:58pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/1 "2021-03-20T12:58:18Z")

</div>

I use Amazon Cognito to authorize clients in a application access to S3 + DynamoDB directly (rather than through our API).

I need to have clients share large binary data (anywhere between 1mb and 500mb). Would the best option be temporarily uploading to S3 to share with other clients, then removing the file after? Or I wonder if there is a better option more suited to this - should Redis be used to share large temporary binary data?

* * *

**Related discussions:**

- [Google Signin + AWS Cognito without the Hosted UI](https://awshq.com/t/google-signin-aws-cognito-without-the-hosted-ui/18565)
- [I made DynamoLens: FOSS desktop companion for DynamoDB](https://awshq.com/t/i-made-dynamolens-foss-desktop-companion-for-dynamodb/20992)
- [Warning to Developers using AWS Cognito.](https://awshq.com/t/warning-to-developers-using-aws-cognito/20699)
- [AWS IAM Identity Center Applications - preferably with Terraform](https://awshq.com/t/aws-iam-identity-center-applications-preferably-with-terraform/21128)
- [Multi-session AWS Dashboard](https://awshq.com/t/multi-session-aws-dashboard/21161)

---

<div class="post-metadata">

**Author:** ![Scarface74](https://awshq.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@Scarface74](https://awshq.com/u/Scarface74)\
**Post date:** [March 20, 2021, 1:36pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/2 "2021-03-20T13:36:13Z")

</div>

I can’t imagine this being a good idea from a cost perspective.

---

<div class="post-metadata">

**Author:** ![quarky\_uk](https://awshq.com/letter_avatar_proxy/v4/letter/q/f4b2a3/32.png) [@quarky\_uk](https://awshq.com/u/quarky_uk)\
**Post date:** [March 20, 2021, 1:42pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/3 "2021-03-20T13:42:33Z")

</div>

Are you thinking about bit-torrent with s3?

[https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html)

---

<div class="post-metadata">

**Author:** ![Scarface74](https://awshq.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@Scarface74](https://awshq.com/u/Scarface74)\
**Post date:** [March 20, 2021, 1:45pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/4 "2021-03-20T13:45:01Z")

</div>

Any AWS solution would still be cost prohibitive because of egress cost.

---

<div class="post-metadata">

**Author:** ![LVermeulen](https://awshq.com/letter_avatar_proxy/v4/letter/l/b2d939/32.png) [@LVermeulen](https://awshq.com/u/LVermeulen)\
**Post date:** [March 20, 2021, 1:47pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/5 "2021-03-20T13:47:33Z")

</div>

> [@quarky\_uk](#):
>
> Are you thinking about bit-torrent with s3? [https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html)

that is really interesting - definitely useful if we wanted to keep costs low by using peer to peer downloading of S3 uploaded files. But not for this use case where uploading to S3 costs are trying to be avoided

---

<div class="post-metadata">

**Author:** ![wlonkly](https://awshq.com/letter_avatar_proxy/v4/letter/w/9de053/32.png) [@wlonkly](https://awshq.com/u/wlonkly)\
**Post date:** [March 20, 2021, 2:26pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/6 "2021-03-20T14:26:03Z")

</div>

WorkDocs? Haven’t figured pricing, but if you’re dealing with files between _people_ then the UI and auth and so on are already done.

---

<div class="post-metadata">

**Author:** ![ch34p3st](https://awshq.com/letter_avatar_proxy/v4/letter/c/34f0e0/32.png) [@ch34p3st](https://awshq.com/u/ch34p3st)\
**Post date:** [March 20, 2021, 2:31pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/7 "2021-03-20T14:31:53Z")

</div>

> [@quarky\_uk](#):
>
> Are you thinking about bit-torrent with s3? [https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html)

Why even take the effort of using s3? Webtorrents should do the trick already. All you need is a static site with Webtorrents, maybe cognito to login first if that’s required…

---

<div class="post-metadata">

**Author:** ![jelder](https://awshq.com/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jelder](https://awshq.com/u/jelder)\
**Post date:** [March 20, 2021, 4:10pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/8 "2021-03-20T16:10:03Z")

</div>

Redis is definitely wrong for this.

S3 can directly serve BitTorrent though.

[https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html)

---

<div class="post-metadata">

**Author:** ![linuxdragons](https://awshq.com/letter_avatar_proxy/v4/letter/l/fbc32d/32.png) [@linuxdragons](https://awshq.com/u/linuxdragons)\
**Post date:** [March 20, 2021, 7:14pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/9 "2021-03-20T19:14:01Z")

</div>

> [@Scarface74](#):
>
> I can’t imagine this being a good idea from a cost perspective.

Why? Ingress to S3 is free, standard storage has no minimum storage requirements and S3 outbound transfer costs are pretty much the same as any other.

---

<div class="post-metadata">

**Author:** ![linuxdragons](https://awshq.com/letter_avatar_proxy/v4/letter/l/fbc32d/32.png) [@linuxdragons](https://awshq.com/u/linuxdragons)\
**Post date:** [March 20, 2021, 7:15pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/10 "2021-03-20T19:15:27Z")

</div>

This is absolutely what S3 is designed for.

---

<div class="post-metadata">

**Author:** ![Scarface74](https://awshq.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@Scarface74](https://awshq.com/u/Scarface74)\
**Post date:** [March 20, 2021, 7:24pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/11 "2021-03-20T19:24:35Z")

</div>

> [@linuxdragons](#):
>
> Why? Ingress to S3 is free, standard storage has no minimum storage requirements and S3 outbound transfer costs are pretty much the same as any other.

You would be better off going with just a regular VPS provider.

---

<div class="post-metadata">

**Author:** ![sjatkins](https://awshq.com/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@sjatkins](https://awshq.com/u/sjatkins)\
**Post date:** [March 20, 2021, 8:48pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/12 "2021-03-20T20:48:46Z")

</div>

REDIS would be good enough for files this small. Or a dirt simple http server on a small instance that everything talks to to access them. EFS is probably overkill. Do all clients read and write or is it mixed? I wouldn’t use S3 for temporary data generally speaking. Especially when there are faster and simpler solutions.

---

<div class="post-metadata">

**Author:** ![Scarface74](https://awshq.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@Scarface74](https://awshq.com/u/Scarface74)\
**Post date:** [March 20, 2021, 8:55pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/13 "2021-03-20T20:55:58Z")

</div>

So you have checked the egress and storage charges for a regular VPS provider or were you too busy researching where to find the right emoticon?

---

<div class="post-metadata">

**Author:** ![Xerxero](https://awshq.com/letter_avatar_proxy/v4/letter/x/b4bc9f/32.png) [@Xerxero](https://awshq.com/u/Xerxero)\
**Post date:** [March 20, 2021, 9:06pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/14 "2021-03-20T21:06:20Z")

</div>

> [@jelder](#):
>
> Redis is definitely wrong for this. S3 can directly serve BitTorrent though. [https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html)

Amazon S3 does not support the BitTorrent protocol in AWS Regions launched after May 30, 2016.

---

<div class="post-metadata">

**Author:** ![linuxdragons](https://awshq.com/letter_avatar_proxy/v4/letter/l/fbc32d/32.png) [@linuxdragons](https://awshq.com/u/linuxdragons)\
**Post date:** [March 20, 2021, 9:23pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/15 "2021-03-20T21:23:58Z")

</div>

> [@Scarface74](#):
>
> You would be better off going with just a regular VPS provider.

Why are you in this subreddit?

Use Lightsail if that works better for you.

---

<div class="post-metadata">

**Author:** ![Scarface74](https://awshq.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@Scarface74](https://awshq.com/u/Scarface74)\
**Post date:** [March 20, 2021, 9:38pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/16 "2021-03-20T21:38:23Z")

</div>

> [@linuxdragons](#):
>
> Why are you in this subreddit? Use Lightsail if that works better for you.

Because I know enough about AWS to know it’s not always the right answer…

---

<div class="post-metadata">

**Author:** ![linuxdragons](https://awshq.com/letter_avatar_proxy/v4/letter/l/fbc32d/32.png) [@linuxdragons](https://awshq.com/u/linuxdragons)\
**Post date:** [March 20, 2021, 10:12pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/17 "2021-03-20T22:12:31Z")

</div>

> [@Scarface74](#):
>
> Because I know enough about AWS to know it’s not always the right answer…

But not enough to understand how to cost optimize using AWS or that they have a “traditional VPS” service. You are the worst kind of wrong, assuredly.

---

<div class="post-metadata">

**Author:** ![BraveNewCurrency](https://awshq.com/letter_avatar_proxy/v4/letter/b/a8b319/32.png) [@BraveNewCurrency](https://awshq.com/u/BraveNewCurrency)\
**Post date:** [March 21, 2021, 1:45am UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/18 "2021-03-21T01:45:50Z")

</div>

If clients must both be on at the same time, then you don’t need S3. You can have _most_ clients talk directly with each-other using WebRTC and a STUN/TURN server. You might need an EC2 server that connects them via 2 TCP ports for certain peers that are on legacy NAT.

---

<div class="post-metadata">

**Author:** ![britishbanana](https://awshq.com/letter_avatar_proxy/v4/letter/b/90ced4/32.png) [@britishbanana](https://awshq.com/u/britishbanana)\
**Post date:** [March 22, 2021, 7:41pm UTC](https://awshq.com/t/best-way-to-use-aws-for-temporary-peer-to-peer-file-sharing/12581/19 "2021-03-22T19:41:35Z")

</div>

You could try using [https://wasabi.com/](https://wasabi.com/) if you’re trying to avoid S3 egress / API fees. I haven’t used it yet but seems like a super cheap alternative if you just need some temporary space to store stuff. I don’t know what kind of auth they support or if there have anything similar to presigned urls.
