Section 3: EC2 Flashcards
General Purpose instance
t2.micro (1 vCPU, 1GB)
Lesson 28
Compute Optimized instance
c5n.large (2 vCPU, 5.25GB)
Lesson 28
Memory Optimized instance
r5ad.large (2 vCPU, 16GB)
Lesson 28
Storage Optimized instance
d2.xlarge (4 vCPU, 30.5GB)
Lesson 28
GPU instance
g2.2xlarge (8vCPU, 15GB)
Lesson 28
Amazon Machine Image (AMI)
Includes:
- Template for the root volume of the image.
- Launch permissions.
- A block device mapping specifying the volumes to attach.
AMIs are regional. You can only launch an AMI from the region in which it is stored.
You can copy AMI’s to other regions using the console, command line, or the API.
Essentially an image that contains the operating system, and any configurations.
Defines the configuration of the instance.
An AMI is created from an EBS snapshot (a point in time backup of an instance).
Lesson 28
EC2 Benefits
- Elastic computing
- Complete control
- Flexible
- Reliable
- Secure
- Inexpensive
Lesson 28
Security Group
Instance-level Firewall.
Basically, a firewall, controlling inbound and outbound traffic.
Determines which ports, protocols, and IP addresses we can connect from.
It functions as a firewall securing access to our instances.
Internet Gateway
Attached to a VPC and enables access to/from internet.
Key pair
Used for connecting securely to our instances.
User data
Ability to run commands when the system is starting. Data limited to 16KB.
Lesson 33
Metadata
Data about your EC2 instance (e.g. private IPv4, public IPv4, etc.) that is recorded locally.
Lesson 33
Access Keys
- Configured on the EC2 instance, and stored on the filesystem of the instance.
- Associated with an IAM User Account (e.g. Eric)
- Uses the permissions assigned to the IAM User.
Lesson 34
EC2 Instance Profile
- the Role is assumed by the EC2 instance.
- No credentials are stored on the instance.
Cluster Placement Group
Packs instances close together in an AZ to achieve low-latency using enhanced networking, low network latency necessary for tight coupled node-to-node (inter-instance) communication typical in HPC applications.
Lesson 38
Partition Placement Group
Spreads instances across logical partitions (separate AWS rack) such that groups of instances in one partition do not share the underlying hardware with groups of instances in different partitions. Strategy typically used by large distributed and replicated workloads like Hadoop, Cassandra, and Kafka.
Neil used NoSQL as a use case.
Partitions can be in multiple AZs (up to 7 per AZ).
Lesson 38
Spread Placement Group
Strictly places a small group of instances across distinct underlying hardware (separate AWS rack) to reduce correlated failures.
Lesson 38
Network Interface (ENI, ENA, EFA)
- EC2 is within AZ (data center), not a public or private subnet.
- EC2 can be attached to multiple subnets through different adapters.
- The (auto) primary network interface has a private IP address and optional public IP address.
- EC2 can have another network interface but it has to be in same AZ.
- Cannot attach ENIs from subnets in different AZs.
Lesson 39
Elastic Network Interface (ENI)
- Basic adapter for non HPC requirements.
- Supports all instance types.
Lesson 39
Elastic Network Adapter (ENA)
- Enhanced network performance.
- Higher bandwidth and lower inter-instance latency.
- Must select a supported instance type.
Lesson 39
Elastic Fabric Adapter (EFA)
- Use with HPC and Message Passing Interface (MPI) and ML use cases.
- Tightly coupled (low latency) applications.
- Supports all instance types.
Lesson 39
Public, Private, and Elastic IP Addresses (EIP)
Public - dynamic. Changes on restart.
Elastic- public and static. Associate with network interface.
ENIs can be remapped to a different instance in the same AZ.
EIPs can be remapped in the same **or across* different AZs.
Lesson 41
Public IP Address
- Lost when the instance is stopped but not restarted/rebooted.
- Used in public subnets.
- No charge.
- Associated with a private IP address on the instance.
- Cannot be moved between instances.
Lesson 41
Private IP Address
- Retained when the instance is stopped.
- Used in public and private subnets. Always have a private IP address.
Lesson 41
Elastic IP (EIP) Address
- Static public IP address.
- Available within a region when allocated.
- Charged even if not used.
- Associated with a private IP address on the instance.
- Can be moved between instances and Elastic Network Adapters.
Lesson 41
Network Address Translation (NAT) for Public Adresses
- On EC2, you only see the private IP address and knows nothing about the public IP address.
- The public IP addesss is associated to the adapter and private IP adress.
- The Internet Gateway (IG) performs NAT.
- The NAT gateway will change the private IP address source address to the public IP address and vice-versa coming back inbound.
Lesson 42