EC2 Flashcards
(39 cards)
What is EC2 in AWS?
A virtual server in the AWS cloud that is scalable, flexible, and pay-as-you-go.
What are the 4 EC2 pricing models?
On-Demand, Spot, Reserved, Dedicated Host.
When should you use On-Demand EC2?
For short-term, unpredictable workloads.
When should you use Spot Instances?
For flexible jobs that can be interrupted; saves up to 90%.
When should you use Reserved Instances?
For predictable workloads with 1–3 year commitments; saves up to 72%.
When should you use Dedicated Hosts?
For licensing or compliance requirements; gives you physical hardware.
What is User Data in EC2?
A bootstrap script that runs at instance launch with root permissions.
What is Metadata in EC2?
Information about the EC2 instance (e.g., instance ID, IP address).
What’s the default rule for EC2 security group inbound traffic?
All inbound traffic is blocked by default.
What’s the default rule for EC2 security group outbound traffic?
All outbound traffic is allowed by default.
Can EC2 security group changes be made live?
Yes, changes take effect immediately.
Can multiple EC2 instances share the same security group?
Yes.
What are IAM roles used for in EC2?
To give EC2 access to AWS services without hardcoding credentials.
Can you attach/detach IAM roles without stopping the EC2 instance?
Yes.
What are ENIs used for?
Basic networking, like separating management and production networks.
What is Enhanced Networking used for?
High throughput (10–100 Gbps) and low latency.
When should you use an Elastic Fabric Adapter (EFA)?
For high-performance computing or ML workloads.
What are the 3 types of EC2 placement groups?
Cluster, Spread, Partition.
Which placement group is best for low latency and high throughput?
Cluster Placement Group.
Which placement group spreads instances across hardware?
Spread Placement Group.
Which placement group is used for HDFS, Cassandra, or HBase?
Partition Placement Group.
Can Cluster placement groups span Availability Zones?
No, only within a single AZ.
What is required before moving an EC2 instance to a placement group?
The instance must be stopped.
What are Dedicated Hosts ideal for?
Special software licenses or compliance rules.