AWS EC2, Spot Instances, AZ, EBS, LB FAQ – (Questions and Answers)

book photo

I am adding AWS questions and Answers which can be fun way to learn. Let me know what you think about it. Suggestions are welcome.

Here are 37 Questions and Answers for your reference.

Question 1: If you want to do workload for a specific number of hours, which will be the cheapest ec2 option?

Answer: Spot block instances. You can reserve it for 1 to 6 hours.

Question 2: What does Spot Fleet consist of?

Answer: Spot Fleet consists of spot instances and on demand instances.

Question 3: Which EC2 placement group would you use if you want highest networking performance?
Answer: Cluster placement group as it will allocate ec2 instances next to each other.

Question 4: For critical applications which can stand AZ failure, which placement group would you use?

Answer: Spread placement group as it will allocate ec2 instances across different Availability zones.

Question 5: Elastic Network Interface(ENI) can be used across multiple AZs?

Answer: No. ENI is specific to AZ.

AWS Solutions Architect Associate SAA-C02 Practice Questions Part 1

Question 6: What is the prerequisite of enabling EC2 hibernate?

Answer: EC2 Instance root volume must be EBS volume.

EBS:

Question 7: Can EBS be removed from one instance and attach to another?

Answer: yes but within the same Availability zone.

Question 8: You want to move volume from one AZ to another. How would you do it?

Answer: First take the snapshot and move.

Question 9: How would you ensure that when you are destroying your EC2 instance, your EBS volume also should get deleted?

Answer: By enabling the option “Delete on Termination” for EBS while provisioning the instance

Question 10: How would you make EBS snapshot available in another AZ?

Answer: Create snapshot and then go to option and copy the snapshot. Here you can select option to copy the snapshot in specific AZ.

Question 11: How would you create an AMI?

Answer: Right click on running EC2 instance and go to create ami option to create ami.

Question 12: what is EC2 instance store?

Answer: If you want very high IO performance with disk then you can use EC2 instance store. 

Question 13: Is EC2 instance store persist the data if ec2 instance is stopped?

Answer: No, since it is ephemeral store, it will loose the data.

Question 14: What types of EBS volumes are present?

Answer: 

General purpose SSD: gp3, gp2

Provisioned IOPS SSD:  io2 Block express, io2, io1

Throughput optimized HDD: st1

Cold HDD: sc1

Question 15: Tell me the IOPS and volume size available for each of SSD.

Answer:

Gp3, gp2: 16000, 1GB-16GB

Io2 Block express: 256,000, 4GB-64TB

Io2,io1: 64000, 4GB-16TB

Question 16: Tell me the IOPS, throughput and volume size available for each of HDD.

Answer: 

St1(Throughput optimized HD): 500, 500 MiB/s, 125GB-16TB

Sc1: 250, 250 MB/s, 125GB-16TB

Question 17: Can HDD be boot volume?

Anser: No

Question 18: Can EBS io1, io2 be attached to multiple EC2 instances?

Answer: Yes but in the same AZ. 

Question 19: EBS uses which encryption mechanism?

Answer: KMS(AES-256)

Question 20: how would you encrypt already running EBS volume?

Answer: First create snapshot. Then copy this snapshot. Encrypt the copied snapshot and attach to EC2 instance.

Question 21: What is EFS?

Answer: EFS is Elastic file system. It is manages network file system which can be mounted on multiple EC2 instances.

Question 22: Then what is the difference between EFS and EBS?

Answer: EFS can be connected from EC2 instances in multiple AZs whereas EBS can be only connected from single AZ.

EFS is pay per use which makes it expensive.

Question 23: Does EFS supports windows?

Answer: No, only linux based AMIs.

Question 24: How many types of EFS are there and how are they different?

Answer: 

EFS Scale: 

  • Huge number of clients, throughput is more than 10GB.
  • It can auto scale to petabyte network file system

Performance mode: 

  • This is default general purpose. It is used when low latency is desired such as web server
  • Max IO: latency is more. Good throughput and parallel processing. Use cases usch as big data.

Throughput mode:

  • Bursting 
  • Provisioned: throughput can be set

Storage Tiers:

  • Standard: it is used for frequently accessed files
  • IA: low cost store but pay for retrieving the files

Question 25: Can one region AMI be used for creating ec2 instance in another region?

Answer: No, AMI is tied to specific region. If you want to use it in another region then you can copy it in to another region and use it.

Question 26: Name the EBS volume types which can be used for boot volumes?

Anser: gp2, gp3, io1, io2 and magnetic

Question 27: What is EBS muti attach?

Answer: Attaching EBS volume to multiple ec2 instances in the same AZ.

Question 28: Which storage will you use if you want storage for high performance local cache? Data can be lost upon termination.

Answer: Instance store.

Scalability & Availability:

Question 29: What is vertical scalability?

A: When we increase the type of instance to have more cpu, memory or network.

Question 30: What is horizontal scalability?

A: When you increase the number of instances. It comprises a distributed system in other words.

Question 31: What is high availability in aws?

A: Running application in multiple data centers(AZs) so that it can tolerate one data center loss.

Load Balancers:

Question 32: What you will do if you want to restrict access to EC2 instance on http/https and allow only through a load balancer?

Answer: Restrict security group of ec2 instance to have http/https protocol rule with load balancer security group..

Question 33: What capability does Application load balancer provide?

A: It can load balance to multiple target groups.

  • It can load balance to multiple applications on the same server on different ports.
  • It supports websocket
  • It support redirect e.g from http to https

Question 34: What are the features of network load balancer?

A: 

  • Works with tcp and udp
  • It can serve millions of requests per second
  • Very less latency around ~100ms as compared to ALB(~400ms)

Question 35: What are the ways to assign IP to NLB?

A: Either you can assign one static ip per AZ or you can use Elastic ip.

Question 36: What is sticky session or session affinity?

A: Maintain client to a specific node behind the load balancer so the same client always go to the same instance so that user doesn’t loose session data.

It can be used in Classic and Application load balancers.

Usually cookies are used for stickiness.

Question 37: What types of cookies are there in aws?

A:

  1. Application based cookies
    1. Generated by the apps. It cannot have reserved cookies name such as AWSALB, AWSALBAPP and AWSALBTG
    2. Its generated by LB. Cookies name: AWSALBAPP
  2. Duration based cookies
    1. Generated by load balancer
    2. Name: AWSALB, AWSELB

Leave a Reply

Your email address will not be published. Required fields are marked *