Extension:AWS

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

Why is this needed
When images are in S3:
 * 1) Amazon EC2 instance which runs MediaWiki doesn't contain any important data and can be created/destroyed by Autoscaling.
 * 2) Visitors download images directly from Amazon S3 (which is fast), not from Amazon EC2 (where network performance depends on instance type, etc.).

Alternatives
Instead of using Amazon S3 (and this extension), you can create an Amazon EFS drive and mount it to $wgUploadDirectory. It's recommended for small wikis.

Installation

 * 1) Download the extension:
 * 2) Move the AWS directory to the "extensions" directory of your MediaWiki, e.g.   (assuming MediaWiki is in  ).
 * 3) Run   from   (to download dependencies). If you don't have Composer installed, see Composer for how to install it.
 * 4) Create an S3 bucket for images, e.g..
 * Note: this name will be seen in URL of images.
 * 1) Authorize MediaWiki to access Amazon S3:
 * 2) 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
 * 3) 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).
 * 4) Modify LocalSettings.php (see below).
 * 1) Modify LocalSettings.php (see below).

See https://github.com/edwardspec/mediawiki-aws-s3/blob/master/README.md for more details.

Step 2: needed IAM permissions
Visit the IAM Management Console - https://console.aws.amazon.com/iam/home - and add "Inline policy" to the IAM role of your Webserver.

Inline policy should contain the following permissions (replace  with the name of your S3 bucket, e.g.  ):