Running Drupal 7 on AWS with EFS

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

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.

The source code for this stack is on Github:

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

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

comments powered by Disqus