From the course: Amazon EC2 Essential Training

What makes up an EC2 instance? - Amazon EC2 Tutorial

From the course: Amazon EC2 Essential Training

What makes up an EC2 instance?

- [Instructor] Let's Understand What Makes Up an EC2 Instance. In this video, we'll identify the components that make up an EC2 instance, and then in the following videos, we'll understand each of those components in detail. So for now, in this video we'll keep it at a very high level. We'll simply identify the components and the features that make up the instance and then in the following videos we'll understand each of those components and its details. Let's start by navigating to the EC2 service. Once you're on the EC2 console, click the launch instance button and then click Launch Instance. Doing so will invoke the EC2 instance launch wizard. The first thing you can configure here is tags. Tags are key value pairs that you can assign to almost any AWS resource. By default, you can assign a name tag, but if you'd like to add additional tags, you can click here and then add the tag key and tag value. For example, you can add tags to identify the owner, email address, department, cost center and more. Tags are very useful for identifying, filtering and cost allocation purposes. Moving on, the next item you can configure is application and OS images, also known as Amazon machine image or AMI. An AMI is a template that contains information about the operating system and applications to be installed. on the instance. You can select from predefined AMIs or you can explore more AMIs in the AWS marketplace and community. Every EC2 instance must be associated with an AMI because it is the AMI that contains information about the operating system and the applications that need to be installed on your instance. Over here, you can select the architecture of the AMI. Moving on, the next item you can configure is instance type. The instance type determines the size or the configuration of the instance in terms of vCPU and memory. By default, the T2 micro instance type is selected that provides one vCPU and one gig of ram. There are other options available that provide more or less configuration. For example, if you select a T2 medium instance type, it provides two vCPUs and four gigs of ram. Over here, you can see the price of a T2 medium instance running different operating systems. Next, you have the option to configure a key pair. A key pair is used to log into the EC2 instance. It contains two keys, a public key and a private key and hence, it is known as a key pair. Most EC2 instances will need a key pair for login purposes. Without a key pair, you might not be able to log into your instance. Moving on, you can configure network settings. To see all settings, click the Edit button. The first setting you can configure is the VPC. A VPC is a virtual network in which you can launch an instance. It corresponds to an IP address range, so essentially a VPC is an IP address range in which you can launch your EC2 instance. A VPC maps to a region. For example, this VPC ending with 1053 belongs to the Oregon region. In the earlier videos, we understood that every region has multiple availability zones. So the VPC IP address range is broken down into smaller IP address ranges known as subnets and every subnet belongs to an availability zone. So in this dropdown, you can select the subnet or in other words, the availability zone. For example, here in Oregon, the availability zones are US West 2a, 2b, 2c, and 2d. And you'll notice every subnet has an IP address range associated with it, and this IP address range belongs to the larger IP address range of the VPC. So essentially a VPC is a large IP address range, which is then broken down into smaller IP address ranges, known as subnets, and each subnet belongs to an availability zone. We'll talk more about VPC and subnets in the upcoming videos. Next, we have the option to configure public IP address. This option here allows you to control whether your EC2 instance will be assigned a public IP address or not. Next, we have security groups; a security group is-- A security group is like a virtual firewall that controls incoming and outgoing traffic for your EC2 instances. To configure a security group, you can define rules and within these rules you can define the type of traffic, protocol, port range and the source or destination of the traffic. Moving on, the next important setting is storage. Over here, you can configure the storage to be associated with your EC2 instance. Every EC2 instance will have at least one volume known as the root volume that contains the operating system. Here is the size and type of the root volume. You can also add additional volumes for your EC2 instance. Moving on, we have some advanced settings, these settings are optional, meaning you do not need to configure them to launch your instance. However, there are some important options that we can talk about. For example, the first one here is request spot instances. Spot instances are a type of EC2 instance that is available at a discounted price. We'll talk more about this in an upcoming video. Next, we have the option to domain join the EC2 instance. This can be useful if you want to join your EC2 instance to a domain like a Microsoft Active Directory domain. The next important setting here is IAM instance profile. By default, your EC2 instance will not have access to other AWS services, even if they belong to your AWS account. For example, if your EC2 instance wants to access an image sitting in your S3 bucket, by default, the EC2 instance will not be able to do so and this is by design. However, by assigning an IAM instance profile, also known as an IAM role to your EC2 instance, the instance will be able to access the image. Moving on, let's look at some other important settings to be aware of like shut down behavior and stop behavior. This controls what happens to your EC2 instance when you shut it down or when you stop it. Then you have settings for termination protection and stop protection, and you also have a setting to turn on detailed CloudWatch monitoring. CloudWatch is a monitoring service from AWS that monitors the different AWS resources. By default, your EC2 instances are monitored every five minutes, but if you'd like to change that to one minute monitoring, you can turn it on from here. Moving on, there are some other important settings to be aware of, like placement group. By default, when you launch an EC2 instance, you do not have control over how the EC2 instance is placed on the underlying hardware or the underlying physical server. By using placement groups, you can influence this. A placement group allows you to influence how EC2 instances are placed on the underlying hardware. This is typically done to improve the performance or fault tolerance of the EC2 instance. We'll talk more about this in an upcoming video. And finally, the other important setting to be aware of is tenancy. The tenancy setting determines whether your EC2 instance will be launched on shared or dedicated hardware. So as you can see, there are so many settings that you can configure when you're launching an EC2 instance. In the upcoming videos, we'll look at each of these settings in detail. Once you've configured your required settings, you can then click the launch instance button to launch your EC2 instance.

Contents