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
- 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.
- Computer Optimized: For better compute performance. It requires more CPU than Memory. Ex: High-Performance Web Servers, Distributed analytics, and machine/deep learning.
- Memory-Optimized: For memory-intensive applications. It Requires more memory than CPU. Ex: In-Memory Databases and Big data processing engines.
- Accelerated Optimized: Suitable for the applications which require more Graphical Power. Ex: Machine Learning, 3D visualization, video encoding.
- 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?
- 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.
- 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.
- 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?
- 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.
- EBS is block-level Storage whereas S3 is object storage
- 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.
- 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.
- 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?
- From AWS Management console, Select EC2
- Under Elastic Block Store select Volumes
- Select create volume
- Enter the required configuration for your volume
- Select the checkbox Encrypt for volume
- Select the KMS Customer Master key to be used under Master Key
- 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?
- Stop your EC2 Instance
- Create EBS Snapshot of the volume you want to encrypt.
- Copy the EBS snapshot, While copying the snapshot select the checkbox encrypt this snapshot.
- Create a new EBS volume from your new encrypted EBS Snapshot. The new EBS volume will be encrypted.
- Detach the original EBS volume and attach your new encrypted EBS volume, making sure to match the device name(/dev/xvda1).
- Start the EC2 instance.