Amazon S3 Storage

The Amazon S3 Storage extension for WooCommerce enables you to serve digital products through your Amazon AWS S3 service.

Using Amazon S3 storage to serve your digital products give you room for better scalability, offers more reliability, specially when serving big files, and greater download speeds for your customers.

To use the Amazon S3 Storage plugin for WooCommerce, you need a Amazon AWS account.

Installation ↑ Back to top

  1. Upload the ‘woocommerce-amazon-s3-storage’ folder to your ‘plugins’ directory.
  2. Activate ‘WooCommerce Amazon S3 Storage’ through the ‘Plugins’ menu in your WordPress admin area.
  3. Configure the plugin settings.

Configuration ↑ Back to top

  1. Go to
  2. On the ‘My Account / Console’ menu at the top, select ‘Security Credentials’.
  3. Copy the ‘Access Key ID’ and ‘Secret Access Key’ and keep them, you will be using them below.
  4. Go to the ‘WooCommerce -> Amazon S3 Storage’ menu in your WordPress admin area.
  5. Paste the  ‘Access Key ID’ and  ‘Secret Access Key’ into the fields.
  6. If you plan to make your files private, eg. to prevent link sharing, enter an amount in minutes into the ‘URL Valid Period’. This will generate a unique URL to the file on Amazon that will only be valid for the period you specify.
It is critical that if you want to make files private that when you upload them to Amazon through the AWS console you select that the file is for Authenticated Users, if it’s set to Everybody the file will be available to everybody with a link.

Please note that if you want to keep your files private you need to enter a value in the “URL valid Period” field. Otherwise you need to change the file permissions on Amazon to Everyone for it to work without that settings:


The URL valid period is used each time a customer clicks the WooCommerce download link, the plugin intercepts the download process and generates a unique amazon url, that url is only valid for the period specified in the URL Valid Period setting. This period has to be defined in minutes. This whole process is hidden to your customers.

Uploading Files to Amazon Web Services ↑ Back to top

To be able to use Amazon S3 to serve your files, you will need to upload your files to the Amazon S3 service.

  1. Go to
  2. From the ‘My Account / Console’ menu at the top select ‘AWS Management Console’
  3. Select the ‘S3’ tab.
  4. If it’s your first time using Amazon S3 you will need to create a bucket. A bucket is a unique identifier and can be set to a specific region, this allows for better latencies, lessen costs and even address regulatory requirements.
  5. To create a bucket, click the ‘Create Bucket’ button at the top left under the Buckets heading. Give your bucket a name and select the region you would the bucket to be hosted in.
  6. To upload files, simply click on your bucket in the left hand side and then click the ‘Upload’ button and follow the procedure.
  7. To make files private/available to anybody, simply click on the file you uploaded and click the ‘Properties’ button.
  8. There should be a ‘Permissions’ tab at the bottom of the screen, click it and from there you can add/remove permissions. Please note that to keep you files private you will need to remove any Everybody permissions and have an Authenticated permission set up with Open/Download checked.

Configure Digital Products ↑ Back to top

With the introduction of WooCommerce 2.0, there is the ability to offer multiple downloads per product. You must use the [amazon_s3] shortcode in the File URL box for this extension to work.

  1. Go to the ‘Products -> Products’ in your WordPress admin area.
  2. Select the product you would like to edit or add a new one.
  3. On the ‘Product Type’ box makes sure the ‘Downloadable’ checkbox is checked.
  4. On the ‘Product Data’ box go to the ‘General’ tab.
  5. Locate the ‘Downloadable Files:’ option.
  6. Enter your amazon_s3 shortcodes in the ‘File URL’ field box.
  7. You can enter anything you’d like in the ‘Name’ field box.
  8. To offer multiple downloads, click on Add File and repeat steps 6 and 7.
Adding files to WC 2.1 using the amazon_s3 shortcode

Amazon S3 Shortcode ↑ Back to top

You can generate unique download URLs anywhere on your WordPress site using the shortcode to offer unique download URLs to files on your Amazon S3 service.

The shortcode is defined as follows:

[amazon_s3 bucket=MyBucketName object=MyFileName.ext]

You need to specify the two arguments bucket and object for the shortcode to work, where bucket is the bucket name and object is the filename including directory if it is located in a sub directory in the bucket.

Please note: we recommend you to avoid points, spaces, dashes etc… in buckets names

To add a download link to a page or posts you can add the following for example

<a href="[amazon_s3 bucket=MyBucket object=MyFile.jpg]">Download File From Amazon</a>

Files Download With Funny Names ↑ Back to top

When you have your store set to make use of ‘Force Download’ and make use of the private URL functionality of the Amazon S3 plugin your files will be get the filename of the URL that gets generated, to get around this you need to set your store to make use of ‘Redirect’ for downloads and optionally just add some meta data to the file on Amazon S3 to make it a specific filename than the one you uploaded it as. By default your file will be downloaded with the name you uploaded it as.

To change the meta data, go to your AWS console, locate the file and then click the properties button. Under the ‘Meta Data’ tab click the ‘Add more metadata’ button, select content disposition from the dropdown and in the value dropdown enter the following: ‘attachment; filename=filename.gif‘ be sure to change filename.gif to the filename the file must be saved as.


WooCommerce 2.0 Support ↑ Back to top

With the release of WooCommerce 2.0 comes significant changes to the downloads functionality. In WooCommerce 2.0 you can now offer multiple downloads per product to your customers, the Amazon S3 extension does support this but now works in a different way then in previous versions of WooCommerce.

Don’t worry about migrating to the new method the extension uses in WooCommerce 2.0 as the extension has a built in updated that will automatically migrate your pre WC 2.0 Amazon settings to the new format.

What this means is that once you activate the new version of the extension on WC 2.0 it will scan through all your previous products that makes use of the Amazon download functionality and convert it to the new shortcode version. You will see once activated that the products will automatically contain a amazon_s3 shortcode in the products File Paths properties.

Audio files playing and not downloading ↑ Back to top

This can be resolved in the same way as the Downloads with funny names issue.

    1. Login to the S3 console, select an object (in my case, an audio file)


  1. Select the Properties button (if the properties window at the bottom isn’t already visible).
  2. Select the Metadata tab.
  3. Select the Add more Metadata button.
  4. Select: Content-Disposition in the drop down.
  5. Enter the Value: attachment
  6. Save


Downloads not completing ↑ Back to top

If you have issues with downloads being slow or it not completing for your customers then be sure to change the WooCommerce Download method to Redirect. You can change this setting under WooCommerce > Settings > Products > Downloadable Products.

Also, make sure that there is no dash or underscore in your bucket and file names

FAQ ↑ Back to top

What happens if I change the bucket’s name? ↑ Back to top

If you need to change the bucket’s name, which is usually done if downloads do not complete, links to downloadable files within emails will no longer work, while links from the My Account page are updated.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top