Quickly Create Amazon CloudFront and Configure it with Magento

  1. Log in to AWS Console here.
  2. Select CloudFront from the services available in Console.
  3. Click on Create Distribution.
  4. What next  -> Select Delivery Method  -> ContinueImageFor this tutorial I will select Download (for caching static files ex. css, js, image files), Streaming is for caching audio/video files.
  5. Origin Domain Name – your website address www.example.com/s3-bucket-name
  6. Origin ID value is autmatically selected.Image
    All other values remain unchanged,scroll down to the end -> Create Distribution.
  7. Wait till the status of the distribution shows Deployed.It takes 5-10 mins.

>Using CloudFront with Magento

  • Copy the ‘Domain Name’ of recently created CloudFront Distribution.
  • Login to Magento Admin Panel of your website.
  • Over to System -> Configuration -> Web
  • Find Unsecure Block                                                                                                Image
  • Change the values of Base Skin URL/Base Media URL/Base JavaScript URL as shown.
  • Save.
  • Test – Inspect any image on your website and check its url, it should be coming from CloudFront Distribution.