Using AWS S3 / CloudFront for content

Estimated reading time: 2 min

Having all content on the WordPress server can be a big stress on your site if you have decent traffic.

One of the easiest ways to reduce the load on the site, is to migrate the content and videos to another place. These steps may not work with SCORM content, but will work with xAPI (Tin Can) packages and Videos.

Amazon AWS S3 is one good place to move this to. You can also add CloudFront to add more speed to the delivery.

What needs to be done?

  1. Move/Copy the files to Amazon S3 (or any other server)
  2. Update the Content URL in xAPI Content
  3. Content Security

How?

There might be multiple ways to do it. I will mention few:

Option 1

  • Prep: Upload xAPI Content like you do using GrassBlade
  • Step 1: Unzip and upload the same files to Amazon S3
  • Step 2a: Check the Content URL and see the file it is referencing.
  • Step 2b: Find the file on S3, get the link to the file, and replace it with the Content URL in the xAPI Content edit page.

Option 2

If you are using VPS or Dedicated Server, and you have SSH access you can also do this.

  • Prep. a: Install AWS s3fs-fuse and link your bucket to wp-content/uploads/grassblade/ folder.
  • Step 1: If you already have uploaded files in the folder. You might need to
    • mount to another folder.
    • Copy all data from wp-content/uploads/grassblade/ to this folder which uploads it to S3.
    • unmount and mount it on wp-content/uploads/grassblade/
  • Step 2: Update the Content URLs using Bulk Settings feature. You would basically replace WordPress URL, with your S3 Bucket URL.

Content Security

You can add security by adding a bucket policy at the bucket level. Something like this:

{
    "Version": "2012-10-17",
    "Id": "http referer policy for yourdomain.com",
    "Statement": [
        {
            "Sid": "Allow get requests originating from yourdomain.com and www.yourdomain.com.",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::your-bucket-name/*",
            "Condition": {
                "StringLike": {
                    "aws:Referer": [
                        "https://your-bucket-name.s3.amazonaws.com/*",
                        "http://yourdomain.com/*",
                        "https://yourdomain.com/*",
                        "http://www.yourdomain.com/*",
                        "https://www.yourdomain.com/*",
                    ]
                }
            }
        }
    ]
}

Make sure you replace “yourdomain.com” with your own domain. And “your-bucket-name” with your own bucket name.

Automated One-Click Interface:

We have built an automated one-click interface which you can purchase for USD 699 one time cost. This includes:

  1. GrassBlade AWS plugin with these features
    • One click upload of files to AWS S3 from WordPress Server
    • Dynamic updation of URL to AWS S3 or CloudFront
    • Ability to delete content from WordPress if need to free up space
    • Ability to download back folder to WordPress from S3
  2. 1 year of support and updates to the plugin.
  3. 1 hr consultation time (if required)
  4. 30 minutes support time to setup the AWS for you (access required)

This package has limited availability. So, please contact us for availability.

DIY Support

If you decide to go DIY on the basis of above information, you will most likely succeed. However, if you need any support anytime, you can purchase support at https://rzp.io/l/7S1Av12 and contact us

Please feel free to Submit a Ticket or email at support@nextsoftwaresolutions.com

Was this article helpful?
Dislike 0 2 of 2 found this article helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping Cart
Scroll to Top
We are making major changes on payment options & license management. Please, click here to report any issues you face during the purchase.