Amazon S3

Introduction

Amazon S3 (Simple Storage Service) is an online service provided by Amazon. it is a low cost, pay-as-you-go service that is fully scalable, fast and reliable. S3 guarantees server uptime of 99.9% and is one of the most cost effective file storage solutions available today.

Amazon S3 also offers 99.999999999% (11 9's) of durability. No better durability guarantee exists in the industry.

S3 is used by companies including Dropbox, Pinterest, Basecamp, Airbnb, Nasdaq, Thomson Reuters, Yelp, Canon and Adobe.

Because WordPress was not designed as a file storage solution the WPS3Files uses Amazon S3 to provide all of its file storage and management capabilities.

Configuring AWS

If you are new to Amazon AWS, follow the steps below to create a new storage bucket.

Create your bucket

  1. Create an Amazon AWS account https://aws.amazon.com/
  2. Login and navigate to Services -> Storage -> S3
  3. Create a new bucket
  4. Give the bucket a name (keep a note of this, you will need to enter this in the plugin storage settings)
  5. Select the region where you would like your bucket and data stored. Keep a note of the region string (e.g. eu-west-1), you will need to enter this in the plugin storage settings
  6. Leave 'Block all public access' selected
  7. Create your bucket
  8. At this point, should you wish, under Properties you can enable AES-256 encryption. You can always enable this later.

Update Bucket CORS Settings

  1. Select your bucket
  2. Go to permissions -> CORS configuration and paste in the below
  3. Hit save
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule> 
<AllowedOrigin>*</AllowedOrigin> 
<AllowedMethod>GET</AllowedMethod> 
<AllowedMethod>POST</AllowedMethod> 
<AllowedMethod>PUT</AllowedMethod> 
<MaxAgeSeconds>3000</MaxAgeSeconds> 
<AllowedHeader>Authorization</AllowedHeader> 
</CORSRule> 
</CORSConfiguration>

Create user for API access

  1. Navigate to Services -> Security, Identity & Compliance -> IAM
  2. Add a new user e.g. wpmediaccess
  3. Select Access Type -> Programmatic access
  4. Under Set Permissions, select 'Attach existing policies directly' and enable 'AmazonS3FullAccess'
  5. Create the user and copy the Access key ID and Secret access key (you will need to enter these in the plugin storage settings)

Configure WPMedia storage

  1. Navigate to the WPMedia plugin within your WordPress site
  2. select Storage -> Amazon AWS
  3. Enter your Bucket name, Region, AWS Key and AWS Secret from above

Test WPMedia

You should now be able to create a folder in the Files area of WPMedia, and once created it will also appear in your S3 bucket within the Amazon S3 Console. From this point onwards, there is no need to use AWS directly as everything can be done via the plugin in wp-admin.

 

Hosted Customers

Default settings for hosted customers are as follows: