[DEVELOPER] Advanced EC2 Flashcards

(9 cards)

1
Q

What is the primary role of the EC2 Instance Profile?

A

A container that passes the IAM Role to the EC2 instance, allowing applications running on the instance to assume the role and access AWS services.

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

What is AWS Systems Manager (SSM) Session Manager used for?

A

It provides secure, auditable access to EC2 instances without needing SSH keys or opening inbound ports (like port 22) on the Security Group.

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

How do you securely provide application secrets (e.g., database password) to an EC2 instance at runtime?

A

Use AWS Secrets Manager or SSM Parameter Store (SecureString). The EC2 instance’s IAM Role must be granted permission to retrieve and decrypt the secret.

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

What is the primary function of AWS Instance Connect?

A

It provides a simple, browser-based way to connect to EC2 instances using temporary SSH keys that are automatically pushed to the instance metadata, eliminating the need to manage long-term SSH keys.

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

What are the three core components of an EC2 Auto Scaling Group (ASG)?

A
  1. Launch Template (or Launch Configuration)
  2. Auto Scaling Group (defines min, max, desired capacity)
  3. Scaling Policies (defines when to scale).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the difference between a Target Tracking Scaling Policy and a Step Scaling Policy?

A
  • Target Tracking: The easiest way; sets a target value for a metric (e.g., keep average CPU utilization at 70%).
  • Step Scaling: Defines specific actions (e.g., add 2 instances) based on specific CloudWatch alarm thresholds.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does an Application Load Balancer (ALB) direct traffic to different target groups based on the request?

A

Using Listener Rules that can evaluate the request path, host header, or query strings.

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

What is the main benefit of using a Network Load Balancer (NLB) over an ALB?

A

NLB handles extremely high traffic and provides ultra-low latency (Layer 4 only), whereas ALB is better for flexible, feature-rich routing (Layer 7).

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

What happens if an instance in an Auto Scaling Group is marked as unhealthy by a Load Balancer?

A

The Load Balancer informs the Auto Scaling Group, and the ASG will terminate the unhealthy instance and launch a new replacement instance.

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