AWS Interview Question and Answers (Part-I)

Posted on Aug. 3, 2019
aws
ec2
vpc
1061

1. What is VPC?

VPC(Virtual Private Cloud)  is one of the Cloud service provided by AWS to launch your resource like EC2, RDS, etc., On the virtual network isolated from other services of cloud.

2. What are the subnets and types of subnets?

When we have a large single network it would be difficult for us to maintain. So for better maintenance, we will divide that network into two or more small networks as per our requirement. These are called subnets. This process is called Subnetting. Subnet allows an organization to connected to the internet with a shared network. All IPs on the subnet have the same prefix.

Subnets in AWS are the subset of the VPC CIDR block.

We have two types of subnets in AWS:

1.Public Subnets: Subnet which is associated with a routing table that has a route to the internet gateway (Used to connect to the internet directly) is called Public Subnet. (EX: Web servers)

2.Private Subnets: Subnet which has no route to the internet directly is called as the private subnet. (Ex: Database servers)

 

3.No. of IPs aws can provide for a VPC?

Netmask of  CIDR block range for a VPC must be between /16 and /28.

No. of IPs should be in between 16 to 65536.

4. What are the types of Instances and their properties:

Instance types determine the hardware of the underlying host. Each type offers different compute, memory, and storage capabilities. The right type of instance was based on the requirements of application or software

  1. General Purpose: These are for common usage. It will provide a balance of computing, memory and networking resources. These instances can be used for Web Servers and  Development environments.
  2. Computer Optimized: For better compute performance. It requires more CPU than Memory. Ex: High-Performance Web Servers, Distributed analytics, and machine/deep learning.
  3. Memory-Optimized: For memory-intensive applications. It Requires more memory than CPU. Ex: In-Memory Databases and Big data processing engines.
  4. Accelerated Optimized: Suitable for the applications which require more Graphical Power. Ex: Machine Learning, 3D visualization, video encoding.
  5. Storage Optimized: For better input-output and disk throughput. Suitable for the application that requires low latency IOPS, Sequential R/W access to large datasets. Ex: NoSQL DBs, Data Warehousing analytical Workloads.

 

 

 

5. What is Load Balancing?

High traffic websites of an application serve thousands or millions of people each day. Load balancing is the process of distributing the workload evenly across the multiple servers. A load balancer sends the request to servers that can efficiently handle them to maximize speed and performance and prevent downtime.

 

6. What are the types of Load Balancers?

  1. Application Load Balancer: operates at Layer 7 of OSI Model. It can inspect application-level content before processing the request or URL or port mentioned in the URL to the webserver.  Supports path-based routing and host-based routing.
  2. Network Load Balancer: Operates at 4th layer. Verifies the IP address before getting into the application content. It will verify the routing decisions at the transport layer itself. It can handle millions of requests and a sudden spike of traffic because it works at the connection level.
  3. Classic Load Balancer:  It takes decisions at the transport layer or application layer. Classic Load Balancer will route the traffic to all registered targets in the Availability zones, it doesn’t check what is in the servers in those targets. It routes to every single target. Mostly it is used to route the traffic to one single URL.

7. What is Autoscaling?

It is a cost-effective way of scaling your applications in the cloud. Whenever your load increases then you have to scale automatically up and down.  It scales your EC2 Instances automatically according to the condition you gave. Increase instances during the demand spikes, maintain performance and decrease capacity during lulls.

 

8. What is the difference between S3 and EBS?

  1. EBS is specifically meant for EC2 instances and is not accessible unless mounted. Whereas S3 not limited to EC2, The files in the S3 can be retrieved using HTTP protocols.
  2. EBS is block-level Storage whereas S3 is object storage
  3. EBS has a standard limit of 20 volumes with each volume holding up to 1TB data, on other hands S3 Standard limit is 100 buckets and each bucket holds unlimited data.
  4. EBS can’t be used by multiple instances at a time. S3 can have multiple images of its contents so it can be used by many at the same time.
  5. S3 typically experience write delays while EBS does not.

9. How to encrypt my EBS and move it to another availability zone and restore instance?

  1. From AWS Management console, Select EC2
  2. Under Elastic Block Store select Volumes
  3. Select create volume
  4. Enter the required configuration for your volume
  5. Select the checkbox Encrypt for volume
  6. Select the KMS Customer Master key to be used under Master Key
  7. Select Create Volume.

      Moving EBS to another AZ and restore instance :

               Create a snapshot of that volume and then create volume from that snapshot. While creating volume select another region.

 

10. Can we encrypt whole EBS volume?

               Yes, we can.

11. How to encrypt the EBS Volume attached a running instance?

  1. Stop your EC2 Instance
  2. Create EBS Snapshot of the volume you want to encrypt.
  3. Copy the EBS snapshot, While copying the snapshot select the checkbox encrypt this snapshot.
  4. Create a new EBS volume from your new encrypted EBS Snapshot. The new EBS volume will be encrypted.
  5. Detach the original EBS volume and attach your new encrypted EBS volume, making sure to match the device name(/dev/xvda1).
  6. Start the EC2 instance.

 

 

 

 

 

 




0 comments

Please log in to leave a comment.