Extension:AWS

AWS extension allows to use Amazon S3 (instead of the local directory) to store MediaWiki images.

Why is this needed
When images are in S3, Amazon EC2 instance which runs MediaWiki doesn't contain any important data and can be created/destroyed by Autoscaling.

Installation

 * 1) Download the extension: git clone --depth 1 https://github.com/edwardspec/mediawiki-aws-s3-stable-fork.git AWS
 * 2) Move the AWS directory to the "extensions" directory of your MediaWiki, e.g. /var/www/html/w/extensions (assuming MediaWiki is in /var/www/html/w).
 * 3) Run composer install from /var/www/html/w/extensions/AWS (to download dependencies). If you don't have Composer installed, see https://www.mediawiki.org/wiki/Composer for how to install it.
 * 4) Choose a unique name (not taken by another AWS user) for your Amazon S3 buckets, e.g. wonderfulbali234. Create four S3 buckets: wonderfulbali234-img, wonderfulbali234-img-thumb, wonderfulbali234-img-deleted, wonderfulbali234-img-temp. Note: this name will be seen in URL of images.
 * 5) If your EC2 instance has an IAM instance profile (recommended), copy everything from "Needed IAM permissions" (see below) to inline policy of the IAM role. See https://console.aws.amazon.com/iam/home#/roles
 * 6) If your EC2 instance doesn't have an IAM profile, obtain key/secret for AWS API. You'll need to write it in LocalSettings.php (see below).
 * 7) 6) Modify LocalSettings.php (see below).

See https://github.com/edwardspec/mediawiki-aws-s3-stable-fork/blob/master/README.md for installation instructions.