Architectural and design question about uploading photos from iPhone app and S3

前端 未结 5 1855
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 10:36

I want to allow users of an iPhone app to upload photos and use Amazon S3. There are 2 ways I see going about this:

  1. Upload from iPhone to my server, which pro
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 11:16

    Upload to your server and then post to S3. From an architecture standpoint you will want to do this from your server. There are many things that could go wrong during the data transfer you can handle better on the server and if you want to store any data about the image you are sending to S3 you are probably going to have a server side call anyway.

    Plus, your Secret Access Key is stored in a more secure environment. Your own.

    If you are worried about scalability and you are going to be doing a considerable number of S3 transfers I would consider hosting your server on and EC2 instance. Transferring data between the two is free (given you store you data in following data centers).

    There is no Data Transfer charge for data transferred between Amazon EC2 and Amazon S3 within the same Region or for data transferred between the Amazon EC2 Northern Virginia Region and the Amazon S3 US Standard Region." Amazon Simple Storage Service (Amazon S3)

    There are many post here on SO Amazon - EC2 cost? (example) about the pros and cons of using EC2.

提交回复
热议问题