S3fs Drupal

Posted onby admin
  1. How To Use Drupal
  2. S3fs Version
  3. Drupal S3 Module
  4. S3fs Proxy Drupal

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. The s3fs module alone only has a. I need to provide a way for the content manager to upload his images directly to s3 from the drupal admin UI so he doesn't have to send it to me to upload via s3cmd or the aws console. Can anyone recommend a module or method for this? I've tried s3fs however mounting a fuse s3 filesystem and serving from it.

How To Use Drupal

  • AWS, Cloud, Drupal, Technology

Drupal provides both public and private file systems. S3 File System (Amazon S3) provides an additional file system to the Drupal site. S3FS module is used to store files in Amazon S3 (Simple Storage Service) or any other S3-compatible storage service. You can configure your Drupal site to use S3 File System as default, or use it only for individual fields.

Amazon S3 vs Amazon CloudFront

Amazon S3 is designed for large-capacity and low-cost file storage in the specific geographical region.The storage and bandwidth costs are quite low. Compared to this, Amazon CloudFront is a Content Delivery Network (CDN) which caches web data at edge locations as close as possible to the user.


  • You don’t have to purchase an additional hardware as your space requirements grow.
  • You receive secure and managed hosting at very low costs.
  • Your server will have an offsite backup in case something goes wrong.
  • Ample amount of data can be stored in a bucket.


1. Amazon S3 bucket

S3fs Version

2. Composer- Composer installs S3 module dependencies such as AWS SDK

3. S3FS Module: Drupal module is required for getting connected to Amazon S3 bucket.

4. Drush


1. On the terminal, go to the project root folder and execute the following commands:
drush dl s3fs

2. Run the below composer command

composer config repositories.drupal composer https://packages.drupal.org/8 && composer require drupal/s3fs

Drupal S3 Module

Drupal s3fs migrate

After running this command, you will get the following screen:

S3fs Proxy Drupal

3. drush en s3fs

4. Goto /admin/config/media/file-system and set the “Default download method” checkbox to “Amazon Simple Storage Service”.

5: Add the type File and Image fields in any content type and set the “Upload destination” to “S3 File System” in the “Field Settings” tab.

6: Configure your S3FS module settings for S3 File System. Add your S3 bucket name at /admin/config/media/s3fs. You can Enter your AWS credentials.

A- Amazon Web Services Access Key
B- Amazon Web Services Secret Key
C- S3 Bucket Name

File Upload:-

After installation, upload your first file by using node creation form. If you are not able to see the uploaded file, it is because your bucket is not yet public. Please go to your bucket, select the s3fs-public folder and then further go to actions and change the status to Public.

If your files exist in another folder inside the root of S3 Bucket, you can enter the folder name in “Public Folder” and “Private Folder” text fields in additional folder setting.

Hope this article gave you a good understanding of S3 File System (Amazon S3) requirements and installation.

Tag -

amazon s3Amazon S3 in DrupalAWS Cloudfrontaws s3DrupalDrupal 8Drupal 8 Features