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

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:

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

Are you thinking about bit-torrent with s3?

https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html

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

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

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.

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…

Redis is definitely wrong for this.

S3 can directly serve BitTorrent though.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3Torrent.html

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.

This is absolutely what S3 is designed for.

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

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.

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?

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

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…

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.

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.

You could try using 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.