[Fixed]-Video uploads to S3 via Django-based API

1👍

You have a couple design options.

  1. If you upload directly to S3 prior to processing, here is a good article on using python to directly upload to your bucket:
    https://devcenter.heroku.com/articles/s3-upload-python

    You’d want a separate task server (or Lambda) to trigger a separate job to handle your video processing. This way your website remains unencumbered and fast. You’ll want to utilize a queue (SQS in AWS) for scale.

  2. Alternatively, your web server can do all the work: the download, processing and s3 upload.

The second approach is more straightforward, but won’t handle web server load as well, it will also be more expensive to scale.

I suggest the first approach which allows s3 to handle your upload, Lambda and a SQS to handle your processing, and your web server remains light. A bit more development as its not linear, but should be cheaper to scale and provide better performance and response time to the user.

👤sonjz

Leave a comment