Skip to content

Instantly share code, notes, and snippets.

@isweluiz
Last active April 17, 2021 19:27
Show Gist options
  • Save isweluiz/665e23aef284b7eade7e01b4c62b3499 to your computer and use it in GitHub Desktop.
Save isweluiz/665e23aef284b7eade7e01b4c62b3499 to your computer and use it in GitHub Desktop.

Amazon Elastic File System (Amazon EFS)

EFS

Scalable, elastic, cloud-native NFS file system

EFS

Abstract

Amazon Elastic File System (Amazon EFS) provides a simple, scalable, elastic file system for general purpose workloads for use with AWS Cloud services and on-premises resources.

Amazon Elastic File System (Amazon EFS) provides a simple, scalable, fully managed elastic NFS file system for use with AWS Cloud services and on-premises resources. It is built to scale on demand to petabytes without disrupting applications, growing and shrinking automatically as you add and remove files, eliminating the need to provision and manage capacity to accommodate growth. Amazon EFS is designed to provide massively parallel shared access to thousands of Amazon EC2 instances, enabling your applications to achieve high levels of aggregate throughput and IOPS with consistent low latencies.

Instances

I created 2 instances for this simple example. 2 AMI with 2 security groups, default and enable ssh and HTTP for external access. In advanced option I put the commands bellow, for install and enable the necessary service; efs and nfs, we will use nfs.

#!/bin/bash
yum update -y 
yum install httpd -y
systemctl start httpd
systemctl enable httpd
yum install -y amazon-efs-utils
yum install -y amazon-nfs-utils
systemctl enable nfs
systemctl start nfs

2 WebServers with apache

Instances2

Instances2

Instances

Create your EFS

EFS2

EFS23

EFS32

EFS223

Mounting the EFS automatic on boot with NFS

NFS-NFS

Mount FS

Accesing our Apache Server

The apache server use the /var/www/html for default in documentroot.

For test, I did download of this test page on both servers.

wget https://raw.githubusercontent.com/mavoweb/test/master/index.html -O /var/wwww/html/index.html

WebServer A

A

WebServer B

B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment