NOTE: This is only for the 1.x version of the module. For 2.x see the module summary page.

Requirements:

Amazon S3 module
Libraries (7.x-2.x branch) module
Amazon Web Services SDK for PHP module

Installation & Setup:

  1. Download and install the Amazon S3, Libraries, and AWS SDK drupal modules. For installation of AWS SDK module you will need to download the Amazon SDK for PHP library v.1.6.2. Download the file to your "sites/all/libraries/" directory. Extract the archive and rename the extracted directory from "sdk-1.6.2" to "awssdk". The final path to sdk.class.php should be "sites/all/libraries/awssdk/sdk.class.php".
  2. Verify that the AWS SDK can be loaded by visiting your site's status report at admin/reports/status; if the status reports indicates that the library cannot be loaded properly even after you verify that it is properly installed, clear all caches to ensure that the Libraries module uses the most up-to-date information
  3. Configure AWS SDK (You will need your two Security Credentials: Access Key ID and Secret Access Key. These are located in your account settings at http://aws.amazon.com)
  4. Configure your bucket settings at /admin/config/media/amazon

You can then:

  • Visit admin/config/media/file-system and set the Default download method to S3
  • Add a field of type File or Image etc and set the Upload destination to Amazon S3 in the Field Settings tab.

Comments

alexharries’s picture

Hi,

Step 3 isn't clear:

3: Configure AWS SDK (You will need your two Security Credentials: Access Key ID and Secret Access Key. These are located in your account settings at http://aws.amazon.com)

How exactly do you configure the credentials? On the admin/config/media/amazons3 page I only see these fields and nowhere to provide the key or secret key:

  • Default bucket name
  • Enable database caching
  • Enable CNAME
  • Torrents
  • Presigned URLs
  • Force save as

Many thank in advance,

A confused Alex

Max_Headroom’s picture

You do this in the AWS SDK settings:
/admin/config/media/awssdk

Quentin Campbell

zarexogre’s picture

Hi, really good module, just hit a few issues setting it up which would prevent me using this module.

- ideally this module should just be able to drop in without to much trouble and the files start using amazon s3. For download that is the case, but far as I can tell I then need to go through all my file/image fields on all my content types and edit them to use amazon s3 as upload method. This needs to be easy and quicker. Maybe an option on the amazons3 - "Use amazon s3 to store all files" checkbox. If they enable this then it automatically changes file system to download from s3 and updates upload settings for all image/file fields. This way it just drops in without too much effort.

- my client may wish to get rid of s3 and just use local file system. Could so with a way of disabling s3, downloading all files locally and updating the files table.

I can help out with either of these with a little guidance. Thanks again, love the way aws sdk is used.

infines’s picture

This isn't a feature request area, please refer to the modules issue queue to suggest and help with features and issues.

http://drupal.org/project/issues/amazons3

BassPlaya’s picture

Have you found or developed something that would do what you explained?

Authentically,
BassPlaya

rkeppner’s picture

I just tripped over this one. If you don't have an AWS SDK settings link, you may need to enable the "AWS SDK for PHP UI" module.

&mdashRussell
Infusionsoft

jca’s picture

If we want to place the files in a directory into the bucket, Where do we place this info?

I try setting the paths in '/admin/config/media/file-system' but it does not work.

Is there anyway to decide which persmissions are applied to a file?

Thank you very much

jca’s picture

If we want to place the files in a directory into the bucket, Where do we place this info?

I try setting the paths in '/admin/config/media/file-system' but it does not work.

Is there anyway to decide which persmissions are applied to a file?

Thank you very much

fuzzybee7’s picture

Thanks for the modules.

AWS SDK for PHP has been updated to version 2.4.1 while the one provided referred here is only 1.6.2.

A lot of things have changed e.g. awssdk.class.php is not there at the usual place anymore

stoan’s picture

Is the bandwidth from the server that is hosting Drupal still getting used when users download a file? Just wanna confirm that.

Siya

mgifford’s picture

In an existing content type, is it possible to change the default location for an existing file or image field?

It didn't look like it in the interface.

rockie667’s picture

Hello,

since some days I try to get Amazon S3 working. When I try to save the amazons3-settings, I always get the error "The S3 access credentials are invalid or the bucket does not exist". I tried credentials of a new S3-User (IAM) as well as creating the keys for the root account at Amazon IAM Dashboard. I added the policy suggested at the zencoder homepage.

My module versions are Amazon S3 module 7.x-1.1, AWS SDK for PHP module 7.x-5.4, AWS SDK library 1.6.2, Zencoder library 2.2.3.

Does anybody have an idea? I am so frustrated at the moment - I have absolutely no idea how to solve this!

guerno’s picture

check this topic: https://www.drupal.org/node/2414127

took me also 6 hours.... just change the bucket to "standard-us", I was trying to store the data in Frankfurt.