Offload Your Downloads with Amazon S3

Written By Anna Werner ON October 26, 2016

When talking about speed optimization for your website, you may have heard of cloud computing or of CDNs before. You can upload files like images, stylesheets or other assets of your website to a cloud storage on a remote server. This server is then connected to a content delivery network (CDN). When a visitors browser requests the files they are delivered using a wide network of fast servers all around the globe. Therefore, download times and connections are much faster. Amazon Web Services (AWS) are most likely the best solution in cloud computing. It’s easy to set up, there are great plugins to help integrate it and all of that comes with relatively low costs.

Amazon Web Services

Amazon created many different offers for AWS. They include long term and short term data storage, different software solution and content distribution. You can find all of them on their website. It’s even possible to run your whole WP install on AWS. But you will have to dig deep into the server infrastructure, to actually get a stable site here.

For most WordPress users, enhancing their speed by uploading images and other media files is enough. And it will already increase speed drastically. If that is your goal as well, you can to use their S3 web service. S3 lets you upload your files to a remote server owned by Amazon and serves them to your users through the distributed network making download speed of media files a lot quicker.

In addition, you can sign up to cloudfront. It is a CDN, which caches your files on servers all around the world. That way, your visitors will always get the media asset which is closest to their geographical location.

For using it’s helpful to know, that pricing of both services are based on your usage and is fairly low. To get an estimate, you can use the AMS calculator. And to connect, AMS uses an API, which you can easily implement in your WordPress installation.

Using S3 For Your Downloads

It’s always up to you, how many of your assets you actually upload to the cloud. For many sites, it’s only the biggest files that need speeding up. If you are offering downloads to your customers, these are probably the largest files on your server. And they take server space from you as well as time to download from your visitors. So even though they are your most important asset, they are also your most bothersome ones. As slow website speed decreases customer satisfaction, conversion rates and the page views, using a CDN for your downloads is very useful.

On top increasing download speed and saving server space and bandwidth, offering your downloads via our Amazon S3 extension add an extra layer of security. Our extension will automatically generate expiring links to your Amazon S3 files. This means that the links to your S3 downloads will only work for 15 minutes. This will prevent users from sharing your Amazon S3 links and directly download your files!

So if you offer big download files, you should think about using the S3 services to increase your speed and customer satisfaction.

Using Download Monitor And Amazon S3

When using Download Monitor, you can get the Amazon S3 extension, which will help you to easily connect your downloads to the files on the Amazon Web Servers. The setup is easy and the results are stunning. Just please do make sure you are running php 5.5 or higher on your server. Otherwise, the connection between the plugin and the amazon API won’t be possible.

What you need as well, is an AWS account. You can use your normal Amazon account if you want, or you can just register as a new user. Once you are set, navigate to Services → S3. You can now set a new “bucket”, as Amazon calls the storage folders in your cloud. There is an well written documentation on how to set up your cloud and its buckets here, if you want some further advice. You then upload your downloadable file into that bucket.

aws_upload-download

Create a bucket and upload your downloadable file to AWS S3

Then install the S3 extension on your website and activate it. If you look at your Downloads → Settings screen now, you can see a new tab for Amazon S3.

There, all you need to do is to supply your API credentials. You can find them in your AWS security credentials. You can also set the region from which to supply the download, but I recommend using the default of automatic detection. Usually, Amazon can do that perfectly. Only change it, if you created a custom endpoint and the extension doesn’t detect your region correctly.

Enter your AWS API credentials

Enter your AWS API credentials

Afterwards, you can set up your downloads. Create a new download and fill in your headline and a description, if you like. When entering your download file instead of linking it to your media files, you enter the link provided in your S3 storage. If there are different versions, you can indicate them as well.

Copy your download link

Copy your download link …

Insert your S3 download link to your new download

… and insert it into your new download

Then you implement the download on your page, wherever you like to display it using the “Insert Download” button above a post content field or the shortcode provided in the downloads setup page.

Integrate the downloadable prodct

Integrate the downloadable product

The download will now appear on your website. When a user requests the file, it will be delivered through the AWS network, without the user noticing anything but a fast download.

Products Used in This Post

  • Amazon S3

    Link to files hosted on Amazon s3 so that you can serve secure, expiring download links.

  • Download Monitor

    Download Monitor is a plugin for uploading and managing downloads, tracking downloads, and displaying links. It provides an interface for uploading and managing downloadable files (including support for multiple versions), inserting download links into posts, and logging downloads.

Leave a Reply

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