So I'm working on a website which serves user uploaded videos, and all the infrastructure is on Amazon. I'm trying to find a good working solution, here is what I'm thinking
First of all what do you think about this? Is there an easier way to achieve the same or better?
Secondly My main problem right now is transferring files to S3, I've tried s3fs to do this, but it has all sorts of weird problems on large file transfers, which made me give up s3fs.
In response to Fastest / best way copy data between S3 to EC2? someone has suggested using EBS volumes, but I'm not sure if it's possible to mount an EBS and then also have access to the same data on S3.
Any help is appreciated
For transferring files to S3, since you are already coding in PHP you should look at the PHP libraries provided by Amazon to interface to their services. Using a file-system-based approach, where it is mounted to your instance, is not the best because the connection to S3 goes down more often than you would like it to. I know, I have tried.
But generally, your approach to "catch" the file on your instance and then push it to S3 is sound. You will need to be careful to not save a reference to the file in your database until it reaches S3, however, otherwise you will have scalability issues if you choose to run multiple instances behind a Load Balancer.
As to the transcoding, the Amazon Transcoding service is pretty new, so I don't have experience with it, but I can highly recommend Zencoder. It, incidentally, runs on AWS and is fast and cheap, and does it the way you are expecting AET to work: you give it an S3 file, and you tell it where to write the transcoded variants, thumbnails, etc.
Hope this helps.