magefm / cdn

**THIS EXTENSION IS NOT MAINTAINED ANYMORE** - Magento CDN module that allows hosting all media on AWS S3. A must when you need to scale Magento horizontally.
MIT License
33 stars 20 forks source link

MageFM CDN

This is a Magento CDN module, built to use when you need scale multiple Magento instances horizontally, avoinding the need of tools like s3fs, rsync, etc to keep the media folder in-sync on every instance.

Features

Supported storages

Installation

  1. Copy all files to the Magento directory;
  2. Clean your cache;
  3. Configure your Amazon S3 credentials at System > Configuration > MageFM > CDN;
  4. Configure your Base Media URL at System > Configuration > General > Web;

Configuring IAM

It is recommended to create a specific IAM userfor handling files on S3. To avoid permission problems, use the following policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1393288415000",
      "Effect": "Allow",
      "Action": [
        "s3:DeleteObject",
        "s3:GetObject",
        "s3:GetObjectAcl",
        "s3:PutObject",
        "s3:PutObjectAcl",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::bucket-name",
        "arn:aws:s3:::bucket-name/*"
      ]
    }
  ]
}

Don't forget to change the bucket-name.