Why are my Amazon S3 images loading slow?

10,844

Solution 1

If you're embedding the images, you should serve them through Amazon CloudFront (Amazon's CDN Service). CloudFront loads the image/file from S3 (or a custom origin) then caches it on their edge servers.

CloudFront Tutorial - http://www.hongkiat.com/blog/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3/

Solution 2

S3 is just for Static Storage, by default it does not have the optimized performance, though there are ways to make it better.

Before you configure CloudFront, you should try enabling `Transfer Acceleration' on S3 bucket.

Source: https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html

Benefits are,

  1. Your customers upload to a centralized bucket from all over the world.
  2. You transfer gigabytes to terabytes of data on a regular basis across continents.
  3. You can't use all of your available bandwidth over the internet when uploading to Amazon S3.

This comes at a price.. (https://aws.amazon.com/about-aws/whats-new/2016/04/transfer-files-into-amazon-s3-up-to-300-percent-faster/)

Pricing for Amazon S3 Transfer Acceleration is simple, with no upfront costs or long-term commitments. You simply pay a low, per-GB rate for data transferred through the service. The pricing is designed to be risk free: if Amazon S3 Transfer Acceleration isn’t likely to make a difference in the speed of an upload (like when you upload data over the short distance from a client in Tokyo to an S3 bucket in Japan), you won’t be charged anything extra for that upload. For more information on pricing, see Amazon S3 pricing.

Share:
10,844

Related videos on Youtube

Jason
Author by

Jason

Coding by morning, Coder by night. Specialising in helping startups in London create their MVP and launching. @Lovetheidea_co Recipes @BusinessCrowd

Updated on September 14, 2022

Comments