and welcome back to BackSpace Academy in this lecture on elastic file service 2
also by explain what EFS is and the advantages and disadvantages of EFS and 3
then I'll talk about mount targets and how we use those to communicate from our 4
subnets through to the elastic file system and also talk about how we can 5
access our file system from the ec2 Linux operating system and then I'll 6
finally talk about the security features of EFS so it's a simple scalable file 7
storage for use with Amazon ec2 instances its network attached storage 8
as opposed to EBS which is attaching a block device storage to an ec2 instance 9
and it can be accessed by multiple ec2 instances at the same time as opposed to 10
block device stories such as EBS in each install so where it fits in with the the 11
storage options that are available for ec2 there it is a file system that is 12
accessed through the network as opposed to object storage with s3 and glacier 13
and block device storage we're teaching a block device to our ec2 instance which 14
is what we do with EBS and instance store so the advantage of EFS is it's a 15
fully managed service the filesystem grows and shrinks automatically and it 16
can grow to petabytes in size so very big or I can go to as small as you want 17
it you only pay for the storage space that you use and there is no minimum fee 18
the throughput it scales automatically depending on demand so it scales to 19
ensure you have consistent low latency and it can support thousands of 20
connections and it also has multiple availability zones 21
own replication of your data so there's some fantastic advantages of EFS the 22
disadvantages EFS it's not available in all regions like with most new services 23
with AWS but that is expanding all the time and it won't be too long before f 24
is available in all regions it doesn't have cross region capability but of 25
course neither does EBS it's a little bit more complicated to provision 26
compared to s3 and EBS so for us to access the EFS share after it's been 27
created we need a mount target located in a subnet in the subnet that our ec2 28
instance is it has been launched in so that mount target is a VPC NFS endpoint 29
in a similar way that we have endpoints for Amazon s3 that allow us to 30
communicate from our VPC out to a service within AWS outside of our VPC 31
the mount target will have an IP address and a dns name and you can use 32
that to with the linux mount command but it's not recommended to do that it's 33
better to use the dns name for the actual EFS share rather than the dns 34
name for the mount target but you can use either and it can be mounted to 35
multiple ec2 instances at the same time so you can see there on that diagram on 36
the Left we've got two ec2 instances within availability zone there US West 37
to a that are both mounted to the same mount target which is in now over the 38
which is then connected through to the EFS share and also the mount targets can 39
be in a different subnet to the instance but they cannot be in a different 40
availability zone so you see on the right hand side there that diagram we've 41
got a ec2 instance in a subnet which is which has a mount target from another 42
subnet that is to it so that's quite possible to do 43
that but you couldn't have an ec2 instance in one availability zone 44
mounting a mount target from another violently design that's not possible to 45
do so the way that we can access our file system from EC2, now that first of 46
all requires an NFS client to be installed on our ec2 instance now that 47
is standard on the current Linux distributions and if you're using the 48
Amazon Linux ami it will be it will come up pre-installed on that so you don't 49
need to worry about that you mount the filesystem you didn't enix now command 50
similar to what you would do with EBS or instance store but you use the domain 51
name for the EFS share and the filesystem DNS name or the mount point 52
point this dns name can be used to mount the EFS on the FS share on ec2 but it is 53
recommended to use a filesystem and DNS name and it's much easy to do 54
that there are a number of security features of EFS that you can use 55
obviously we have I am permissions to create update and delete which we can 56
set up on a user or group basis we also have easy to security groups that can be 57
set as inbound rules for EFS and also vice versa we can have security group 58
rules for EFS as inbound for ec2 as well we can use network access control list 59
to further control traffic and we also have Linux UNIX file route only 60
permissions by the fault and we change those file permissions using CHOWN or 61
chmod commands within Linux as we would do with any other Linux file server so 62
that's it for now the best way to learn about EFS is to get your hands on and 63
use it which is what we'll do in the next lecture