EC2 Flashcards

(39 cards)

1
Q

What is EC2 in AWS?

A

A virtual server in the AWS cloud that is scalable, flexible, and pay-as-you-go.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 4 EC2 pricing models?

A

On-Demand, Spot, Reserved, Dedicated Host.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When should you use On-Demand EC2?

A

For short-term, unpredictable workloads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When should you use Spot Instances?

A

For flexible jobs that can be interrupted; saves up to 90%.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When should you use Reserved Instances?

A

For predictable workloads with 1–3 year commitments; saves up to 72%.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When should you use Dedicated Hosts?

A

For licensing or compliance requirements; gives you physical hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is User Data in EC2?

A

A bootstrap script that runs at instance launch with root permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Metadata in EC2?

A

Information about the EC2 instance (e.g., instance ID, IP address).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What’s the default rule for EC2 security group inbound traffic?

A

All inbound traffic is blocked by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What’s the default rule for EC2 security group outbound traffic?

A

All outbound traffic is allowed by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can EC2 security group changes be made live?

A

Yes, changes take effect immediately.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can multiple EC2 instances share the same security group?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are IAM roles used for in EC2?

A

To give EC2 access to AWS services without hardcoding credentials.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Can you attach/detach IAM roles without stopping the EC2 instance?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are ENIs used for?

A

Basic networking, like separating management and production networks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Enhanced Networking used for?

A

High throughput (10–100 Gbps) and low latency.

17
Q

When should you use an Elastic Fabric Adapter (EFA)?

A

For high-performance computing or ML workloads.

18
Q

What are the 3 types of EC2 placement groups?

A

Cluster, Spread, Partition.

19
Q

Which placement group is best for low latency and high throughput?

A

Cluster Placement Group.

20
Q

Which placement group spreads instances across hardware?

A

Spread Placement Group.

21
Q

Which placement group is used for HDFS, Cassandra, or HBase?

A

Partition Placement Group.

22
Q

Can Cluster placement groups span Availability Zones?

A

No, only within a single AZ.

23
Q

What is required before moving an EC2 instance to a placement group?

A

The instance must be stopped.

24
Q

What are Dedicated Hosts ideal for?

A

Special software licenses or compliance rules.

25
What is a Spot Block?
Prevents Spot Instances from being interrupted for a set duration.
26
What is a Spot Fleet?
A collection of Spot (and optionally On-Demand) instances.
27
What is vCenter on AWS used for?
Extending VMware environments to AWS for migration or disaster recovery.
28
What is AWS Outposts?
Extends AWS infrastructure into your on-premises data center.
29
What are the two types of AWS Outposts?
Outpost Racks (42U, for large deployments) and Outpost Servers (1U, for small/edge sites).
30
Which AWS service should they use to run EC2 instances in their own data center?
AWS Outposts – Brings native EC2, EBS, and other AWS services to on-prem environments.
31
Which placement group type should you use for a stateful web application that must maintain session data?
Partition Placement Group – Ideal for spreading instances across partitions (hardware racks and AZs) for fault tolerance.
32
What must you do before changing the instance type in a Cluster Placement Group?
Stop the instance, change the instance type, and then restart it within the placement group.
33
What EC2 networking feature enables connecting an instance to two separate subnets?
Elastic Network Interfaces (ENIs) – Attach multiple ENIs to assign the instance to different subnets.
34
What should you enable to mitigate SSRF risks via the EC2 instance metadata endpoint?
IMDSv2 (Instance Metadata Service Version 2) – Requires session-based access to metadata, mitigating SSRF.
35
Which should you use for Auto Scaling Groups: Launch Template or Launch Configuration?
Launch Template – Supports versioning and advanced EC2 features; Launch Configurations are legacy.
36
Which EC2 deployment model supports SQL Server licenses tied to physical cores?
Dedicated Hosts – Provide control over physical server placement for licensing compliance.
37
What EC2 feature should be enabled for automatic instance recovery on new hardware?
EC2 Auto Recovery – Automatically recovers the instance on new hardware in the same AZ.
38
Which allocation strategy should be used to optimize Spot Fleet diversification?
Capacity Optimized – Chooses pools with the most available capacity to reduce interruption risk.
39
Which EC2 feature should be enabled to increase disk throughput for a large database?
EBS-Optimized Instances – Provides dedicated network throughput for EBS volumes.