title: Coupling Amazon EC2, Amazon S3 and Android app for photo sharing
body: <p>I decided to go with Amazon AWS for my Android cloud app, which is a photo sharing app. I set up an instance on EC2 with PHP and MySql, for handling simple requests and storing basic user information. I also set up a S3 service to store all the photos.</p>
  
  <p>But now I'd like some advice. I'm not sure how to handle the three together. Should the EC2 server always be used as a mediator between the end-user using the app and the S3 service? Or should the end-user on Android communicate directly with S3 when it can?</p>
  
  <p>Say for example the user registers on my app and decides to upload a picture. Should I send the JPEG to my EC2 server, and then let the server send the pic to S3? Or should the I send it directly to S3, get the URL back on the device and then send it to my EC2 server? Either way, I need to store the S3 url addresses in my MySQL database as to send them to the other users, so they can access the newly public images.</p>
  
  <p>Any idea on how I should do this?</p>