Drupal 8 S3fs

 
  1. Drupal 8 Download
  2. Drupal 8 Requirements

A recent project gave me the opportunity to familiarize myself with the Drupal 8 version of the S3 File System (s3fs) module (having used the D7 version briefly in the distant past). This module provides an s3:// stream wrapper for files stored in an S3 bucket, allowing them to be used as seamlessly as locally stored public and private files. Feb 13, 2018 S3 bucket is an inexpensive alternative for file storage by AWS. STEP 9 - To use S3 bucket with Drupal 8, follow these instructions. Create one S3 bucket from AWS dashboard. Make sure it is publicly readable and writable.

Requirements:

1. Amazon S3 bucket

Drupal 8 s3fs download

https://aws.amazon.com/s3/

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

(https://aws.amazon.com/sdk-for-php/).

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

4. Drush

Installation:

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

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.

Drupal 8 Download

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 a 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.

ADDITIONAL SETTINGS :

Drupal 8 S3fs

Drupal 8 Requirements

If files exist in some 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.