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.
If you are new to Amazon AWS, follow the steps below to create a new storage bucket.
Create your bucket
- Create an Amazon AWS account https://aws.amazon.com/
- Login and navigate to Services -> Storage -> S3
- Create a new bucket
- Give the bucket a name (keep a note of this, you will need to enter this in the plugin storage settings)
- 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
- Leave 'Block all public access' selected
- Create your bucket
- At this point, should you wish, under Properties you can enable AES-256 encryption. You can always enable this later.
Update Bucket CORS Settings
- Select your bucket
- Go to permissions -> CORS configuration and paste in the below
- 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
- Navigate to Services -> Security, Identity & Compliance -> IAM
- Add a new user e.g. wpmediaccess
- Select Access Type -> Programmatic access
- Under Set Permissions, select 'Attach existing policies directly' and enable 'AmazonS3FullAccess'
- 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
- Navigate to the WPMedia plugin within your WordPress site
- select Storage -> Amazon AWS
- Enter your Bucket name, Region, AWS Key and AWS Secret from above
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.
Default settings for hosted customers are as follows:
- OFF: Enable versioning https://docs.aws.amazon.com/
- OFF: Log requests for access to your bucket https://docs.aws.amazon.com/
- OFF: Record object-level API activity https://docs.aws.amazon.com/
- ON: Automatically encrypt objects https://docs.aws.amazon.com/
- OFF: CloudWatch request metrics https://docs.aws.amazon.com/
- ON: Block new public ACLs and uploading public objects (Recommended)
- ON: Remove public access granted through public ACLs (Recommended)
- ON: Block new public bucket policies (Recommended)
- ON: Block public and cross-account access if bucket has public policies (Recommended)
- OFF: Grant amazon s3 log delivery group write access to this bucket