- Log in to AWS Console here.
- Select CloudFront from the services available in Console.
- Click on Create Distribution.
- What next -> Select Delivery Method -> ContinueFor this tutorial I will select Download (for caching static files ex. css, js, image files), Streaming is for caching audio/video files.
- Origin Domain Name – your website address www.example.com/s3-bucket-name
- Origin ID value is autmatically selected.
All other values remain unchanged,scroll down to the end -> Create Distribution.
- 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
- Test – Inspect any image on your website and check its url, it should be coming from CloudFront Distribution.