1 00:00:00,000 --> 00:00:03,580 So, now let's discuss EBS versus EFS. 2 00:00:03,580 --> 00:00:05,840 So EBS volumes can be attached 3 00:00:05,840 --> 00:00:08,570 to only, one instance at a time, 4 00:00:08,570 --> 00:00:12,430 and they are locked into a specific Availability Zone. 5 00:00:12,430 --> 00:00:13,300 So here's an example, 6 00:00:13,300 --> 00:00:16,160 we have our EC2 instance in the first AZ 7 00:00:16,160 --> 00:00:18,230 and the EBS volume, as we can see, 8 00:00:18,230 --> 00:00:19,587 really is within that AZ 9 00:00:19,587 --> 00:00:23,090 and is only attached to one EC2 instance at a time. 10 00:00:23,090 --> 00:00:25,350 So we seeing we have different types of EBS volumes, 11 00:00:25,350 --> 00:00:27,090 some important ones is gp2, 12 00:00:27,090 --> 00:00:30,610 where the IO will increase as the disk size increases. 13 00:00:30,610 --> 00:00:32,810 Or the io1, where we can increase 14 00:00:32,810 --> 00:00:34,610 the IO independently from volume size, 15 00:00:34,610 --> 00:00:37,800 and this is great if you're running a critical database. 16 00:00:37,800 --> 00:00:39,940 If you want to migrate an EBS volume 17 00:00:39,940 --> 00:00:42,140 across different Availability Zone, 18 00:00:42,140 --> 00:00:44,400 then you first need to take a snapshots, 19 00:00:44,400 --> 00:00:46,366 and then, once you have the snapshots 20 00:00:46,366 --> 00:00:48,620 you're going to restore the snapshot into another AZ, 21 00:00:48,620 --> 00:00:52,050 and that will create a new EBS volume into that AZ. 22 00:00:52,050 --> 00:00:55,160 And so while you do this, EBS snapshots, EBS backups, 23 00:00:55,160 --> 00:00:57,510 that will use all of IO on your EBS volumes, 24 00:00:57,510 --> 00:00:59,810 so it should be run only when your instance 25 00:00:59,810 --> 00:01:01,760 is not actively using your EBS volumes 26 00:01:01,760 --> 00:01:04,670 otherwise, you may get performance issues. 27 00:01:04,670 --> 00:01:07,600 Finally, the Root EBS Volumes of your instances 28 00:01:07,600 --> 00:01:09,720 will get terminated by default 29 00:01:09,720 --> 00:01:11,690 when your EC2 instance gets terminated, 30 00:01:11,690 --> 00:01:13,060 but this is a behavior 31 00:01:13,060 --> 00:01:15,340 that you can disable, if you want it to. 32 00:01:15,340 --> 00:01:17,130 So this should be something you master right now, 33 00:01:17,130 --> 00:01:18,710 this is very easy, this is EBS, 34 00:01:18,710 --> 00:01:20,280 and this is all you need to know. 35 00:01:20,280 --> 00:01:22,040 And now, you should know that EFS 36 00:01:22,040 --> 00:01:24,330 is, its very, very, very different. 37 00:01:24,330 --> 00:01:26,350 So EFS is your Elastic File System, 38 00:01:26,350 --> 00:01:29,040 and this one can be mounted to hundreds or thousands, 39 00:01:29,040 --> 00:01:32,460 or instances across multiple Availability Zone. 40 00:01:32,460 --> 00:01:34,760 So these instances are running Linux, 41 00:01:34,760 --> 00:01:36,980 and as we can see the EFS in this case, 42 00:01:36,980 --> 00:01:40,000 sits outside of our AZ because it is multi-AZ. 43 00:01:40,000 --> 00:01:42,400 So, you can use EFS Mount Targets 44 00:01:42,400 --> 00:01:44,410 that are going to be in specific AZ, 45 00:01:44,410 --> 00:01:47,170 to mount between your EC2 instances 46 00:01:47,170 --> 00:01:50,040 all the way to your EFS drive. 47 00:01:50,040 --> 00:01:52,560 And so, we can use EFS to share website files 48 00:01:52,560 --> 00:01:53,700 such as WordPress, 49 00:01:53,700 --> 00:01:56,060 and as I said, it is only for Linux Instances 50 00:01:56,060 --> 00:01:57,760 because it is a POSIX file system, 51 00:01:57,760 --> 00:02:00,000 so it does not work for Windows. 52 00:02:00,000 --> 00:02:03,050 EFS is going to be more expensive than EBS, 53 00:02:03,050 --> 00:02:04,960 about three times more expensive, 54 00:02:04,960 --> 00:02:07,150 but if you want it to do some cost saving, 55 00:02:07,150 --> 00:02:10,479 you can use EFS-Infrequent Access as a storage tier 56 00:02:10,479 --> 00:02:12,160 and using a lifecycle policy, 57 00:02:12,160 --> 00:02:15,020 to have these enhanced cost savings. 58 00:02:15,020 --> 00:02:17,770 And again, what you remember is that for EFS, 59 00:02:17,770 --> 00:02:21,080 you do get billed only for what you use on your EFS, 60 00:02:21,080 --> 00:02:23,300 whereas for EBS, you have to provision in advance 61 00:02:23,300 --> 00:02:25,200 a size that you know for EBS drive, 62 00:02:25,200 --> 00:02:27,500 and you pay for the provision capacity 63 00:02:27,500 --> 00:02:29,750 not the actual use capacity. 64 00:02:29,750 --> 00:02:31,770 So, now you should remember, 65 00:02:31,770 --> 00:02:34,020 EFS is really for a network file system 66 00:02:34,020 --> 00:02:36,120 to be mounted across multiple instances. 67 00:02:36,120 --> 00:02:40,140 EBS is for a network volume, 68 00:02:40,140 --> 00:02:42,020 then it should be mounted only on one instance 69 00:02:42,020 --> 00:02:43,730 and it is locked to an AZ. 70 00:02:43,730 --> 00:02:46,380 An Instance Store is to get the maximum amount of IO 71 00:02:46,380 --> 00:02:47,900 onto an EC2 instance, 72 00:02:47,900 --> 00:02:50,380 but is something you lose, if you lose that instance, 73 00:02:50,380 --> 00:02:52,870 so it is an ephemeral drive, okay. 74 00:02:52,870 --> 00:02:54,120 Well that's it, I hope you liked it, 75 00:02:54,120 --> 00:02:56,070 and I will see you in the next lecture.