[Solved]-Upload direct to S3 or via EC2?

16๐Ÿ‘

โœ…

I would definitely do it through S3 for scalability reasons. True, data between S3 and EC2 is fast and cheap, but uploads are long running, not like normal web requests. Therefore you may saturate the NIC on your EC2 instance.

Rather, return a GUID to the client, upload to S3 with the key set to the GUID and Content-Type set appropriately. Then call a web service/Ajax endpoint to create a DB record with the GUID key after the upload completes.

๐Ÿ‘คreach4thelasers

Leave a comment