I'm trying to get Drupal to work with the S3 File System module.

enter image description here

I downloaded the AWS SDK files and put them in the libraries folder. I don't know why I'm getting the failed to load error.

enter image description here

enter image description here

I tried using the https://github.com/aws/aws-sdk-php/releases/download/2.6.3/aws.zip as suggested. It fixed 1 of the 2 errors, but it fails to load the AWSSDK.

enter image description here

  • I tried to clear the cache, but it didn't help
  • I checked the admin/reports/dblog page, in the case the errors were related to file permissions on the SDK files), but nothing shows up
  • despite the error, I just tried to upload files and it worked fine with no problems I guess I'll just ignore it as it only shows up in status report. – No Sssweat Oct 1 '15 at 14:31

Check the README.txt of the S3 File System module. Contains a couple of instructions that are helpful.

In the unlikely circumstance that the version of the SDK you downloaded causes errors with S3 File System, you can download this version instead, which is known to work: https://github.com/aws/aws-sdk-php/releases/download/2.6.3/aws.zip

Ensure that theawssdk2 folder itself, and all the files within it, can be read by your webserver. Usually this means that the user apache (or _www on OSX) must have read permissions for the files, and read+execute permissions for all the folders in the path leading to the awssdk2 files.

The link to the aws-sdk-php on the AWS installation page will allow you to download the latest version (3.4.1).

On my case, I had to download the 2.6.3 version of the SDK that is mentioned on the README.txt.

You might want to check at admin/reports/dblog if there are any errors related to loading the SDK.

I found that sometimes the libraries info gets hard cached and that is why this module has the _s3fs_load_awssdk2_library(). Take a look of this:

This function is a replacement for calling libraries_load('awsdsk2'). It's needed because libraries_load() caches failures to load the library, meaning that temporarily having a bad setup (e.g. nonexistent or unreadable files in the awssdk2 folder) can lead to the library being permanently unable to be loaded, even after the bad setup is repaired. This can only be remedied by clearing the full site cache.

TD;LR: sometimes you will need to refresh the libraries cache for the SDK, if that is the case, the _s3fs_load_awssdk2_library() can be invoked by going to admin/config/media/s3fs/actions and use the "Refresh file metadata cache" button option. Or also you can use the Drush command drush s3fs-refresh-cache.

  • 2.6.3 worked for me, before with 3.4.1 it wouldn't let me save the settings, now I'm able to save with no error alerts. For some odd reason it still shows an error on status report, but whatever the uploads to s3 work fine =) – No Sssweat Oct 1 '15 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.