EC2 Core Concepts
Understand the core elements related to EC2 and their operational mechanics..
In this lesson, we will go over the Elastic Network Interface, Amazon Machine Image (AMI), the different types of instances offered by EC2 and their use cases, and EC2 user data.
Elastic Network Interface (ENI)
An Elastic Network Interface (ENI), also known as a Network Interface, is a virtual network card that can be attached to the EC2 instances. ENI is a logical networking component that can be used to provide multiple IP addresses or attach an instance to different subnets. An Elastic Network Interface (ENI) in AWS is associated with an Availability Zone (AZ) in a region. This means that we can attach and detach the ENI to different instances within the same Availability Zone.
Every instance launched has a default network interface, known as the primary network interface; by default, it offers a private IP address to the instance. However, it can be configured to offer the public as well as the elastic IP address. A primary network interface can not be detached from an instance. However, we can attach more network interfaces to an instance. The number of network interfaces that can be attached to an instance depends upon the instance type and size. For example, m1.xlarge
can have up to 4 network interfaces; similarly, t2.micro
can have 2 network interfaces maximum.Types of IP addresses
ENI offers different types of IP addresses, each offering a unique set of characteristics. The three different types of IP addresses are: Public, Private, and Elastic IP address.
Public IP addresses are used to communicate over the internet. AWS allows us to control whether an instance in the network receives a Public IP address or not. Sometimes, we do not want our instance to communicate with the internet directly to make it more secure. The public IP address of instances remains associated with the instance until it’s stopped or terminated.
Private IP addresses are essential for communicating within a VPC. Each instance in the network has a unique private IP address that is used as the identifier for that instance.
Elastic IP ...