AWS EC2 Flashcards
What is EC2 in AWS?
EC2 stands for Elastic Compute Cloud, a highly configurable virtual server.
What is Cloud-Init?
Cloud-init is the industry-standard multi-distribution method for cross-platform cloud instance initialization.
What are the three types of data Cloud-init uses to initialize cloud instances?
Meta-data, User-data, Vendor-data.
How can you retrieve metadata about an EC2 instance?
By making a call to the Metadata Service (MDS) at the special endpoint http://169.254.169.254/latest/meta-data/
for IPv4 or http://[fd00:ec2::254]/latest/meta-data/
for IPv6.
What are the two versions of the EC2 Instance Metadata Service (MDS)?
IMDSv1 (request/response method) and IMDSv2 (session-oriented method requiring a token).
How is an EC2 instance type name structured?
The name includes the instance family, generation, processor family, additional capabilities, and available virtual resources (e.g., c7gn.xlarge).
What are the five main EC2 Instance Family categories and their designations?
General Purpose: A, T, M
Compute Optimized: C
Memory Optimized: R, X, High Memory, Z
Accelerated Optimized: P, G, F, Inf, VT
Storage Optimized: I, D, H
What is an EC2 Instance Profile?
A reference to an IAM role that is assumed by the EC2 instance upon creation to avoid passing long-lived AWS credentials.
What are some key points about EC2 Instance Profiles?
They can be associated at any time, only one IAM role can be associated, changing roles is not instantaneous, and they can be listed only via API.
What does the EC2 Instance Console Screenshot feature do?
It takes a screenshot of the current state of the instance.
What must be configured for hostname preserving in EC2?
Cloud-Init must be configured for hostname preserving, and a reboot is required after changing the hostname.
What are the two types of hostnames in EC2?
IP Name (legacy) and Resource Name.
What does disabling source/destination checks on an EC2 instance allow?
It allows the instance to pass through traffic, useful for Network Address Translation (NAT).
What is a Placement Group in EC2?
A feature that lets you choose the logical placement of your instances for communication, performance, or durability
What are the three types of Placement Groups in EC2?
Cluster, Partition, and Spread.
Which type of Placement Group is ideal for tightly-coupled node-to-node communication?
Cluster Placement Group, where instances are packed together in one Availability Zone (AZ).
Which Placement Group type spreads instances across different logical partitions to avoid shared hardware?
Partition Placement Group.
Which Placement Group type allows placing instances on different racks and is ideal for critical instances?
Spread Placement Group.
What is an Amazon Machine Image (AMI)?
AMI provides the information required to launch an EC2 instance.
What are some actions you can perform with an AMI?
- Turn EC2 instances into AMIs
- AMIs are region-specific; to move between regions, create a copy.
- Purchase or sell AMIs on AWS Marketplace.
- Store and restore AMIs from an S3 bucket.
- Deregister, deprecate, or disable AMIs.
- Share AMIs with public, explicit, or implicit settings.
What information does an AMI hold?
Template for the root volume (e.g., operating system, applications)
Permissions controlling who can use the AMI
Block device mapping specifying the volumes to attach.
What are some use cases for AMIs?
Keep incremental changes to OS, application code, and system packages.
Routine patching with System Manager Automation.
Use with Launch Configurations or Launch Templates for managing revisions.
What are the two boot modes for AMIs, and which one should be used unless there is a reason to use the other?
Legacy BIOS (Basic Input/Output System) and UEFI (Unified Extensible Firmware Interface). UEFI should be used unless there is a reason to use Legacy BIOS.
What are the characteristics of Legacy BIOS?
Initializes hardware during boot-up and provides runtime services.
No secure boot.
May be required for legacy OS or software.