Showing posts from May, 2016

Setting up AWS CloudFront for Magento

Here are some steps I jotted down for setting up AWS CloudFront as a CDN for the 3 asset directories that are used by Magento installations. I am assuming your Magento application servers are behind an ELB.

SSL certificate upload to AWS
Install aws command line utilities.
$ pip install awscli
Configure AWS credentials
Create IAM user and associate it with the IAMFullAccess policy. Run ‘aws configure’ and specify the user’s keys and the region.

Bring SSL key, certificate and intermediate certificate in current directory:
-rw-r--r-- 1 root root 4795 Apr 11 20:34 gd_bundle-g2-g1.crt -rw-r--r-- 1 root root 1830 Apr 11 20:34 -rw------- 1 root root 1675 Apr 11 20:34
Run following script for installing wildcard SSL certificate to be used in staging CloudFront setup:
$ cat #!/bin/bash
aws iam upload-server-certificate --server-certificate-name WILDCARD_MYDOMAIN_COM_FOR_PROD_CF --certificate-body file:/…