Drupal S3fs

Jul 06, 2019 Next story Drupal 8 Rest API tutorial and creating custom Rest API; Previous story AWS S3 bucket integration with Drupal 8 using s3fs module. Unable to configure Drupal S3FS to successfully connect with Minio. Drupal 7 and Minio are in seperate docker containers. 2pm utc+7 to ist. I am able to login to Minio using the access and secret keys but the S3F3 configuration form complains The Access Key in your AWS credentials is invalid. I also posted an issue here. I examined issues such as #4914 but I don't understand if that issue is actually solved. 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 S3. May 28, 2019 S3FS (S3 File system) module configuration in Drupal Next we need to install s3fs contributed module from below link. I am highly recommend to install this module using composer. Because this module require AWS SDK for PHP version 3 installed in your server.

S3fs

In two previous blog posts I talked about running Drupal 7 on AWS:

  • Running Drupal 7 on AWS - part 1: The How & Why
  • Running Drupal 7 on AWS - part 2: The CloudFormation stack

Since writing part 2 of this topic AWS has finally released Elastic File System (EFS), so I had to write an update for the stack that uses EFS instead of S3.

Elastic File System (EFS)

EFS is a shared nfs filesystem you can attach to one or more EC2 instances. While we can store our user uploaded content in S3 using the Drupal s3fs module, getting the css and js aggregation cache to work over multiple servers was still an issue with S3.

If we use EFS instead of S3, and share the sites/default/files directory over every EC2 instance, we remove that problem.

Drupal S3fs Login

The source code for this stack is on Github:

Amazon

S3fs File Proxy Drupal

  • drupal7-efs.json: A very minimal Drupal 7 stack setup
  • drupal7-efs-realistic: A more realistic Drupal 7 site with a lot of contrib modules. This also uses a Docker hub container image instead of building an image in the Launch Configuration.

S3fs Version

I will continue to work on the second one, so you probably want to take that stack.

A short note about this stack and Docker

Drupal S3fs User

While this stack uses Docker it is not a complete container management system like ECS is intended to be. Rolling out a new version of a Docker image with this stack is pretty much a manual job: you scale the Auto Scaling Group down to 0 nodes, then scale it up again to the required number. All the new instances that get created that way will have the new version of your Docker image. (or you can scale it up to double the normal size and then scale down again to remove the old instances).