- [Morgan] Hi everyone, Morgan here. What we're going to do in this video, is walk through the exercise for Amazon EC2 instances. To go ahead and get started, you can see that I am already logged in to the AWS Management Console. From here, I want to navigate to the Amazon EC2 service. So, you can either click Services here and select EC2 here or there, or you can type EC2 into the search bar. So, there are many different ways you can get to the Amazon EC2 dashboard. And this is what the Amazon EC2 dashboard looks like. So from here, what we want to do is select Launch instance, and then we can begin the process of launching an Amazon EC2 Instance. Next, what we need to do is select an AMI. An AMI is an Amazon Machine Image. And this is a template that contains all of the software configuration for an instance, which includes things like your operating system, and any software that you would have pre-installed on an instance upon boot. So you can use AMIs that are in the Quick Start, here. You can get AMIs from the AWS Marketplace, or you can create your own AMIs. We are going to use this AMI here, Amazon Linux 2 AMI, so I'll go ahead and click Select. Then, what we want to do next is choose an instance type. We are going to leave the t2.micro selected, because this is Free Tier eligible. So, I will go ahead and click Next to configure instance details. From here, we're going to leave all of the default settings. What this is going to do is, it will launch the instance into your default VPC. So, that's fine for experimentation purposes. So, we are going to go ahead, and launch into the default VPC, with no preference on the subnet, though in real life, you would want to not use the default VPC. For experimentation purposes, the default VPC is perfectly fine. So I'm going to go ahead and scroll down, and click Add Storage. And from here, you can see we already have one volume, and that's the root volume, but what I want to do next is add a new volume. And we're going to leave all of the defaults here, as well. So, you can see this root volume has Delete on Termination selected, and this will automatically delete this EBS volume whenever you terminate the instance. But we're going to leave this one unchecked, which means that we'll have to go in and delete the EBS volume separately after termination of the instance. So, then I'll go ahead and click Next to add tags, then click Review and Launch. From here, you can view all of your instance details if you would like. We did leave the defaults for most of these. So now, we'll go ahead and click Launch, and then we will select to Proceed without a key pair. And then, acknowledge that without a key pair, the only way you can connect to this instance is through EC2 Instance Connect, which is perfectly fine. And then, we will click Launch Instances. All right, so we'll go ahead and let this create. Now, we can see at the top we have a green banner, your instances are now launching. The following instance launches have now been initiated. So, we can click on this Instance ID, and then click on it one more time. And this will bring up the details page for that instance, you can see all sorts of information here, like the public IP address, the private IP address. Scroll down, you can see the AMI ID. You can also see different information about security, and networking, storage. If you scroll down here, you can see the EBS volume that we added here. So now, what we have to do is wait a few minutes for this instance state and these status checks to change to running. So, we have to make sure that all of these status checks pass, and that the instance state is in a running state before moving on to the next step. So, we'll go ahead and wait a few minutes and let those run. Okay. Now, we can see that the instance state is running, and both of these status checks are also running. So, the next task in this exercise is to create an AMI. And to do that, I'm going to click Actions, and then Image and templates, and then Create image. From here, we'll give this image a name, I'm going to call this, My AMI. You can give it a description, if you would like. And then, we're going to scroll down and click Create Image. And now, you can see we have our running EC2 instance here. And the next thing that we need to do, is do some cleanup for this exercise, which will include terminating the instance, deleting the volumes, and deregistering the AMI. So to do that, I'm going to select the running EC2 instance, and then, I will click Terminate instance. And then, I will click Terminate. And we can then refresh this here, and we can see that our instance state has now changed to say shutting down. So it was running, now it's shutting down. And eventually, it will flip to say terminated, like this one up here does. So, we'll give that a few minutes here to terminate. We can now see that the instance has terminated. So, the next thing that we need to do is to go delete any EBS volumes that were left. So, we will click Volumes on the left-hand side. And then, I'm going to select the only volume that we have here, you can see that the state is available. That's because when we terminated the EC2 instance, this volume did not get deleted with it, so it's just kind of sitting out there. It could then be attached to another EC2 instance, if you needed to. But instead, we're going to delete this volume. So I'll click Delete Volume, and then we'll say Yes, Delete. You can see that that volume has now been deleted. And then finally, one last step here is to click AMIs on the left-hand side. Then you can see My AMI, and then I will click Deregister, and Continue. And we are now good to go, that is it for this exercise. Thanks, and see you in the next one.