Search code examples
phpamazon-web-servicesamazon-ec2amazon-s3amazon-cloudfront

User Images in S3 vs EC2 (CloudFront Performance)


Users currently upload multiple images to a folder on my EC2 server. They will get multiple views by numerous users.

Should I be uploading all these images to S3 instead via the SDK and then load them via CloudFront to increase performance when they are viewed by other users?

http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpPHP.html


Solution

  • Yes, the highest performance option will be to use s3/cloudfront combo. Your app may or may not benefit from the extra performance, depending on where your users are, and how they use your system, but generally that is the best practice.