1 00:00:06,580 --> 00:00:12,710 In the previous videos you have learned how you can install a virtual machine using some virtualization software. 2 00:00:13,890 --> 00:00:18,730 You can also run a virtual machine in cloud. Let's see how that works in aws. 3 00:00:20,309 --> 00:00:27,100 To do so, you need to go to your AWS console, and in the AWS console you go to EC2. 4 00:00:27,750 --> 00:00:29,769 EC2 is where you create your instances. 5 00:00:30,730 --> 00:00:34,795 In order for this to work you do need a vpc. But by default 6 00:00:34,795 --> 00:00:38,859 when you set up your AWS account, you will get the Virtual Private Cloud. 7 00:00:39,399 --> 00:00:45,189 And this Virtual Private Cloud allows you to host multiple instances as if they were in your own network. 8 00:00:46,490 --> 00:00:49,590 So in the EC2 overview you see a lot of information. 9 00:00:50,310 --> 00:00:52,689 The option that you need is Lounge Instance. 10 00:00:54,109 --> 00:01:00,549 So let's give a name to the instance, like my new instance. After giving a name 11 00:01:00,549 --> 00:01:06,989 to the instance, you need to select what exactly operating system you want to use. 12 00:01:07,510 --> 00:01:09,430 Different operating systems are available. 13 00:01:09,989 --> 00:01:15,230 If you already have a preference for a certain Linux distribution, you can select that distribution here. 14 00:01:16,109 --> 00:01:19,329 I'd like to give it a try for AWS Linux. 15 00:01:19,870 --> 00:01:23,914 AWS Linux is very similar to Red Hat Enterprise Linux. It's 16 00:01:23,914 --> 00:01:27,959 just cheaper because it doesn't come with the same license requirements. 17 00:01:29,519 --> 00:01:35,909 Now we need to select the ami. The AMI is a profile with hardware settings and what you typically 18 00:01:35,909 --> 00:01:42,299 would be looking for is something that is free tier eligible. These are the cheapest, if not free. 19 00:01:43,920 --> 00:01:48,159 Next you select your architecture and your instance type. 20 00:01:48,950 --> 00:01:54,355 Now the instance type that I'm going to use here is T2 micro or even 21 00:01:54,355 --> 00:01:59,760 better if you click on it, you can find There is also T2 Nano. 22 00:02:00,420 --> 00:02:04,094 It's really small. It has one VCPU 0.5 gigs of memory. 23 00:02:04,094 --> 00:02:07,769 But for taking a test drive with Linux that is okay. 24 00:02:08,830 --> 00:02:10,969 Then you need an SSH key pair. 25 00:02:11,659 --> 00:02:15,605 If you don't have a key pair yet, you can click Create New key pair. I already 26 00:02:15,605 --> 00:02:19,550 have a key pair with the name mykeypair and that is what I'm going to use. 27 00:02:20,530 --> 00:02:23,939 In ssh. Public private key authentication is the default. 28 00:02:24,560 --> 00:02:29,449 And here you create a key pair that allows you to do public private key authentication. 29 00:02:30,949 --> 00:02:34,719 Then there is the network settings. In the network settings you need to select 30 00:02:34,719 --> 00:02:38,490 a network and a subnet. All of that is defined in your vpc. 31 00:02:39,150 --> 00:02:45,485 If you have any errors here, you need to verify that your network and subnet setting is correct in 32 00:02:45,485 --> 00:02:51,819 the VPC configuration. But that's more the topic of an AWS course, so let's not do that here. 33 00:02:53,039 --> 00:02:57,019 Anyway, if you work with a brand new Amazon account, you 34 00:02:57,019 --> 00:03:01,000 should be okay and you should get a working vpc. 35 00:03:02,360 --> 00:03:07,840 Then we need a security group. The security group is all about Internet access. The only 36 00:03:07,840 --> 00:03:13,319 thing I care about is SSH traffic from. I want to allow SSH traffic from anywhere. 37 00:03:13,930 --> 00:03:16,729 Next I'm going to launch instance and that will start it. 38 00:03:17,629 --> 00:03:21,550 So it has successfully initiated the launch of the instance. That shouldn't take too much. 39 00:03:22,849 --> 00:03:27,050 Once it is there, you can use the Connect to your instance option. 40 00:03:28,550 --> 00:03:34,909 If you click Connect to instance, you can see Connect using a public ip and that's the one I want to use. 41 00:03:35,409 --> 00:03:42,270 I'm not going to do anything difficult with SSH public private keys here, but if you do want to do 42 00:03:42,270 --> 00:03:49,130 something difficult with these SSH public private keys, just make sure that the PEM file in your SSH key pair 43 00:03:49,129 --> 00:03:55,990 is downloaded to your local machine and use SSH I to refer to the PEM file as an argument. 44 00:03:59,990 --> 00:04:06,602 Maybe that doesn't make sense now. That's okay, we'll talk about SSH in more detail later. Let's 45 00:04:06,602 --> 00:04:13,213 go for connect using a public IP which is opening the browser interface to your instance. And 46 00:04:13,213 --> 00:04:19,826 look here, this is the browser interface to my instance where I'm logged in by default as 47 00:04:19,826 --> 00:04:26,438 the EC free M is showing that I have half a megabyte of memory and DF h 48 00:04:26,437 --> 00:04:33,050 showing that I have a little bit of storage as well on my XVDA device. 49 00:04:33,970 --> 00:04:37,889 That is how you can connect to an instance 50 00:04:37,889 --> 00:04:41,809 in AWS and try Linux without installing anything. 51 00:04:43,170 --> 00:04:47,963 Do be mindful that depending on your choices, you may be charged for your instances. 52 00:04:47,963 --> 00:04:52,756 So once you are done and you don't need it anymore, don't forget to remove 53 00:04:52,756 --> 00:04:57,550 the instance because if you're beyond your free tier usage, you will be billed.