In the previous videos you have learned how you can install a virtual machine using some virtualization software.
You can also run a virtual machine in cloud. Let's see how that works in aws.
To do so, you need to go to your AWS console, and in the AWS console you go to EC2.
EC2 is where you create your instances.
In order for this to work you do need a vpc. But by default
when you set up your AWS account, you will get the Virtual Private Cloud.
And this Virtual Private Cloud allows you to host multiple instances as if they were in your own network.
So in the EC2 overview you see a lot of information.
The option that you need is Lounge Instance.
So let's give a name to the instance, like my new instance. After giving a name
to the instance, you need to select what exactly operating system you want to use.
Different operating systems are available.
If you already have a preference for a certain Linux distribution, you can select that distribution here.
I'd like to give it a try for AWS Linux.
AWS Linux is very similar to Red Hat Enterprise Linux. It's
just cheaper because it doesn't come with the same license requirements.
Now we need to select the ami. The AMI is a profile with hardware settings and what you typically
would be looking for is something that is free tier eligible. These are the cheapest, if not free.
Next you select your architecture and your instance type.
Now the instance type that I'm going to use here is T2 micro or even
better if you click on it, you can find There is also T2 Nano.
It's really small. It has one VCPU 0.5 gigs of memory.
But for taking a test drive with Linux that is okay.
Then you need an SSH key pair.
If you don't have a key pair yet, you can click Create New key pair. I already
have a key pair with the name mykeypair and that is what I'm going to use.
In ssh. Public private key authentication is the default.
And here you create a key pair that allows you to do public private key authentication.
Then there is the network settings. In the network settings you need to select
a network and a subnet. All of that is defined in your vpc.
If you have any errors here, you need to verify that your network and subnet setting is correct in
the VPC configuration. But that's more the topic of an AWS course, so let's not do that here.
Anyway, if you work with a brand new Amazon account, you
should be okay and you should get a working vpc.
Then we need a security group. The security group is all about Internet access. The only
thing I care about is SSH traffic from. I want to allow SSH traffic from anywhere.
Next I'm going to launch instance and that will start it.
So it has successfully initiated the launch of the instance. That shouldn't take too much.
Once it is there, you can use the Connect to your instance option.
If you click Connect to instance, you can see Connect using a public ip and that's the one I want to use.
I'm not going to do anything difficult with SSH public private keys here, but if you do want to do
something difficult with these SSH public private keys, just make sure that the PEM file in your SSH key pair
is downloaded to your local machine and use SSH I to refer to the PEM file as an argument.
Maybe that doesn't make sense now. That's okay, we'll talk about SSH in more detail later. Let's
go for connect using a public IP which is opening the browser interface to your instance. And
look here, this is the browser interface to my instance where I'm logged in by default as
the EC free M is showing that I have half a megabyte of memory and DF h
showing that I have a little bit of storage as well on my XVDA device.
That is how you can connect to an instance
in AWS and try Linux without installing anything.
Do be mindful that depending on your choices, you may be charged for your instances.
So once you are done and you don't need it anymore, don't forget to remove
the instance because if you're beyond your free tier usage, you will be billed.