S3 File System (s3fs) provides an additional file system to your drupal site, which stores files in Amazon's Simple Storage Service (S3) or any other S3-compatible storage service. You can set your site to use S3 File System as the default, or use it only for individual fields. This functionality is designed for sites which are load-balanced across multiple servers, as the mechanism used by Drupal's default file systems is not viable under such a configuration.

Dependencies

7.x-2.x

S3 File System uses the Libraries module to access the AWS SDK for PHP 2.x library. S3 File System's README.txt file gives detailed instructions for the SDK's installation. Please note that AWS SDK for PHP 3.x is not compatible with S3 File System 7.x-2.x. You must install the 2.x version of the SDK unless using the (currently experimental) 7.x-3.x branch. The README includes specific instruction to this effect.

7.x-3.x

Composer manager will use the included composer.json file to pull in and autoload the latest 3.x version of the AWS PHP SDK.

8.x-3.x

Uses AWS SDK for PHP v3. If module is installed via Composer it gets automatically installed.

8.x-2.x

This version is deprecated in favor of 8.x-3.x branch.

Additional Requirements

Your PHP must be configured with allow_url_fopen = On in your php.ini file. Otherwise, PHP will be unable to open files that are in your S3 bucket.

In addition, you need the php5-curl library installed for the SDK to be able to communicate with S3. Most hosts will already have this library installed, but some don't.

Companion Modules

  • If your users need to upload very large files to your site, you might want to use the S3FS CORS Upload module. It enables CORS-based uploads, allowing files to be uploaded directly to S3, rather than being routed through your server.
  • S3FS Migrate aids in converting a site that's currently storing its media files on the local filesystem into a S3-backed site.
  • S3FS File Proxy lets you easily configure your site to allow existing hard-coded URLs to files continue to work once the files have been migrated to S3.
  • S3FS File Proxy to S3 it's thought for staging environments that use S3, download your images on demand from your production site and then upload to your staging bucket.
Supporting organizations: 
Initial D8 porting

Project Information

Downloads