AWS VPC


1. What is the actual definition of the term “VPC”?

Answer:

 

Amazon Web Services (AWS) is a wonderful platform you can’t ignore if you seriously want to build a career in cloud technology. With the growing importance of AWS, even a newbie in this field can get big paychecks depending on his/her skills & certifications in AWS services.

 

VPC (Virtual Private Cloud) is such an AWS service that’s getting more recognition in the technology job market nowadays. Knowing the essentials of VPC can give an upper hand to job hunters, who are aspired to an AWS career. Our role is to make you ready for that. So here, we bring the best AWS VPC interview questions that usually repeat in AWS interviews. Before that, let’s go through some basics about this technology a beginner needs to know while pursuing AWS training.

 

As most of you know, AWS is an Amazon subsidiary that provides access to cloud computing services based on user demand. Users have to pay on a subscription basis.  Amazon provides different services to seamlessly blend your local resources with the cloud. AWS S3 (Simple Storage Service) is an AWS service that allows object storage through different web service interfaces like SOAP, BitTorrent, etc. Knowing how to answer top AWS interview questions can help you to gain an upper edge over candidates who wish to be a part of the AWS teams.

 

If S3 is for storage, then there’s Amazon EC2 (Elastic Compute Cloud) for the compute domain in AWS. It allows its users to access instances or virtual machines within AWS infrastructure. EC2 is generally considered as the pioneer in modern cloud computing technologies. For developers, EC2 provides scalable compute capacity. If you are one who wants to work in a fast-evolving computing environment aspiring to solve hard problems along with smart people, then practicing AWS EC2 interview questions will be a decisive step in your career.

 

Finally, VPC; It is a service that allows AWS customers to access their services in a customized private network. We can find this service under Networking & Content Delivery menu of AWS dashboard. This private cloud from Amazon is known to be one of the most secure private cloud services available now. Here, users will have absolute control of their private cloud. They can choose their own IP range, can configure network gateways and create subnets. It’s best used in conjunction with EC2.

 

Well, VPC is a private network space within the Amazon cloud that enables you to launch AWS resources. It’s the actual networking layer of Amazon EC2, about which we have already discussed. Each private network you create on the cloud will be logically separated from other virtual networks in the cloud.

 

Although the structure of VPC looks similar to a standard network that you’d operate in a data center, a VPC will have the benefits of the scalable infrastructure of AWS. Another major advantage of VPC is that it is fully customizable. You can create subnets, set up root tables, configure network gateways, setup network access control lists, choose IP address range, and many more in a Virtual Private Cloud.

 

2. What are the components of Amazon VPC?

Answer: The foremost element in Amazon VPC architecture is VPC network itself. It’s a logically separated part of AWS cloud. It’s possible to define your Virtual Private Cloud’s IP address from the range you’ve chosen. The second element is the Internet Gateway which is the connecting point between your VPC and the public internet. Subnets are the functional parts of your private cloud’s IP address range.

 

NAT Gateways are used to connect between instances of your private subnet with internet or other AWS services. Customer Gateways are your side of a VPN connection in AWS while Virtual Private Gateways are Amazon VPC side of VPN connection. This type of questions lies under the general or basic AWS VPC interview questions. Whether you are a fresher or have some experience, you may come across such questions so get prepared with the answer.

 

Components of Amazon VPC with Brief description:

Element

Brief description

Virtual Private Cloud (VPC)

A logically isolated virtual network in the AWS cloud. You define a VPC’s IP address space from a range you select.

Subnet

A segment of a VPC’s IP address range where you can place groups of isolated resources.

Internet Gateway

The Amazon VPC side of a connection to the public Internet.

NAT Gateway

A highly available, managed Network Address Translation (NAT) service for your resources in a private subnet to access the Internet.

Hardware VPN Connection

A hardware-based VPN connection between your Amazon VPC and your datacenter, home network, or co-location facility.

Virtual Private Gateway

The Amazon VPC side of a VPN connection. The Customer gateway is the customer side of a VPN connection.

Peering Connection

A peering connection enables you to route traffic via private IP addresses between two peered VPCs

VPC Endpoint

Enables Amazon S3 access from within your VPC without using an Internet gateway or NAT, and allows you to control the access using VPC endpoint policies.

 

3. What are Internet Gateways in VPC?    

Answer: An Internet Gateway is highly available, horizontally scaled VPC component. Gateways establish coherent connections between your Amazon VPC network and the internet. There can be only one gateway associated with each VPC. These are the VPC components that provide NAT (Network Address Translation) for instances which have already assigned public IP addresses. In the case of internet routable traffic, such a gateway provides a target in your VPC route tables.

 

Also Read: How to Build Virtual Private Cloud (VPC) in AWS

 

4. What is a NAT Device?

Answer: A NAT device in your VPC will enable instances in the private subnet to trigger outbound IPv4 traffic to other AWS services/internet while hindering inbound traffic initiated on the internet. Here when traffic goes out to the internet, IP address gets replaced by NAT device’s address and when the response comes back to the instances, the device translates the address of instances back to the private IP addresses. AWS has two types of NAT devices – NAT instance and NAT gateway. Linux AMIs are configured to run as NAT instances. NAT does not support IPv6 as well.

 

5. What is a subnet in VPC?

Answer: According to AWS documentation, subnets are nothing but a range of IP addresses in your VPC. It is possible to launch the resources of AWS into your desired subnet. For resources that need internet access, you can use a public subnet. Whereas for resources that don’t need the internet, a private subnet is sufficient.

 

The default subnet in your VPC must have the netmask value 20 that can give up to 4096 addresses per subnet. The subnet is always confined within a single availability zone whereas VPC can span across multiple zones.

 

Want to become an AWS Certified Architect? Start your preparation now for the AWS Certified Solutions Architect Associate exam.

 

6. What is the default VPC? Explain its advantages.

Answer: The questions based on default VPC are among the top AWS VPC interview questions. It’s a logically isolated virtual network that gets created automatically in AWS cloud for an account when the user makes use of Amazon EC2 resources for the first time.

 

You can alter the components of the default VPC as per your need. There are several advantages of a default VPC. Here, a user can access high-level features such as different IPs, network interfaces without creating a separate VPC or launching instances.

 

7. What is ELB (Elastic Load Balancing) and how does it affect VPC?

Answer: As the name implies ELB is a load balancer service for AWS deployments. A load balancer divides the amount of work a computer has to do into more computers and get it done faster. In the same way here ELB distributes incoming application traffic into multiple targets like EC2 instances.

 

There are 3 types of ELBs to ensure scalability, availability, and security for ensuring your applications as fault tolerant. These are classic, network, and application load balancers. Network and application load balancers can be used in conjunction with VPC and these can route traffics to targets within VPCs.

 

Also, learn about Amazon Route 53 and Route 53 Pricing.

 

8. What do you know about VPC Peering?

Answer: You may be asked about the AWS VPC peering bandwidth in AWS VPC interview. It’s simply the networking connection between two VPs in the same network. It’s possible to create a VPC peering connection between your own VPs or VPC with another AWS account within the same region. It’s not needed for AWS to break the existing VPC infrastructure to enable VPC peering. There is no need of a special hardware for this purpose. It’s not creating a VPN connection or network gateway within the AWS.

 

The main intention behind such a connection is to facilitate data transfer across multiple VPNs spanning different AWS accounts. This type of peering is a one-to-one relationship wherein transitive connection is not supported.  And while talking about AWS VPC peering bandwidth, there are no bandwidth limitations for peering connections as well.

 

Know More: https://www.whizlabs.com/blog/vpc-peering-basics/

 

9. What are the differences between Private, Public & Elastic IP Addresses?

Answer: The questions based on Elastic Network Interfaces are among the most common AWS VPC interview questions.

 

As the name implies, private IP addresses are IP addresses that aren’t accessible over the internet. If you want to communicate between instances in the same network, private IPs are used. At an instance launching time, a private IP from subnet’s IP address range and a DNS hostname is assigned to eth0 of the instance (default network interface).

 

A private IP address remains associated with the network interface will get released only when the instance is terminated (not when the instance is stopped or restarted). On the contrary, a public IP address is easily accessible over the internet.

 

When you launch a VPC instance, one public IP will automatically assign to the instance which isn’t associated with your AWS account. Every time you restart and stop the instance, AWS will allocate a new public IP to the instance. The main difference between a public and elastic IP is that elastic IP is persistent. It’ll be associated with your AWS account until you terminate it. Anyhow, you can detach elastic IP from one instance and attach the same IP to a different instance. Elastic IP is also accessible over the internet.

 

10. Is there any limit to the number of VPCs, subnets, gateways, VPNs that I can create?

Answer: Yes, there is definitely a limit. You can create 5 VPCs per region. If you want to increase this limit, you’ve to increase the number of internet gateways by the same number. And, per VPC 200 subnets are allowed. 5 elastic IP addresses are allowed per region. The number of Internet, VPN and NAT gateways per region is also set to 5.

 

Anyhow, customer gateways are allowed to 50 per region. One can create 50 VPN connections per region. It is highly recommended to cover questions based on connectivity while going through the top AWS VPC interview questions.

 

Read Now: Amazon Braket

 

11. Can you illustrate what is CIDR Routing in VPC?

Answer: The questions based on IP address are the common among frequently-asked AWS VPC interview questions. This CIDR question can be answered in the following manner. Classless inter-domain routing (CIDR) is a set of Internet protocol (IP) standards that are used to allocate IP addresses for networks and individual devices. With CIDR, a single IP address can be used to pick many unique IP addresses.

Generally, A CIDR IP looks like a normal IP address except there is a slash followed by a number in CIDR. This part is called the IP network prefix. In VPC, CIDR block size can be from /16 to /28 in case of IPv4. When you’re creating a VPC, you actually have to specify a range of IP address in form of CIDR just like 10.0.0.0/16. This CIDR is the primary CIDR block of your VPC.

 

CIDR offers the benefits of effective management of available IP address space and reduce the number of routing table entries. If you are still wondering what does CIDR stand for, learn more!

 

12. What are Security Groups in VPC?

Answer: In VPC, a security group’s function is to manage the traffic for the instances. Instances can be single in number or many. Actually, it does act as a virtual firewall that can control inbound and outbound traffic for different EC2 instances. You can manually add rules to each security group to control the traffic within the associated instances.

 

In AWS console, security groups can be located in both VPC and EC2 sections. By default, all security groups allow outbound traffic. In the same way, you can define rules to allow inbound traffic. But one thing- you are only allowed to create “allow” rules rather setting up denial rules to restrict security permissions. Also, it’s possible to change the rules of a security group irrespective of the time and the process of changing rules will take place instantly. You may come across questions on security in an AWS VPC interview, so we’ve included it in our list of the best AWS VPC interview questions.

 

Must Read: How to improve connectivity and secure your VPC resources?

 

13. What do you mean by Network ACLs (Access Control List) in VPC?

Answer: Network ACLs does the similar function of a network security group in VPC; IE controlling inbound and outbound traffic in VPC. The main difference between a network ACL and a security group is that the latter’s role is to act as a firewall for associated EC2 instances whereas an ACL’s role is to serve firewall job for associated subnets. Your VPC generates an ACL automatically by default and it’s modifiable. Unlike a security group, this default network ACL allows all inbound and outbound traffic by default. And it’s possible to associate an ACL with multiple subnets. But at a time, only one subnet can be associated with a network ACL.

 

You can also create your own custom ACL and it can be associated with a subnet. Such an ACL denies all types of inbound/outbound traffic until you add rules to it.

 

14. What is stateful and stateless filtering?

Answer: A stateful filtering checks the origin of the request and triggers automatic replay to the originating computer. On the other hand, stateless filtering only examines the source and destination IPs ignoring whether it’s a new request or replay to a request.

 

In VPC, security groups carry out stateful filtering whereas network ACLs perform stateless filtering. Filtering based questions are generally asked in the interview among other popular AWS VPC interview questions so you need to prepare yourself with the answer.

 

Also Read: AWS OpsWorks

 

15. What are the functions of an Amazon VPC router?

Answer: VPC router allows Amazon EC2 instances within subnets to interact with Amazon EC2 instances in other subnets within the same VPC. Virtual private gateways, subnets and Internet gateways, etc. can also communicate with each other by means of a VPC router.

 

Amazon KMS is a managed service that is integrated with various other AWS Services. You can use it in your applications to create, store and control encryption keys to encrypt your data. Learn AWS KMS Key Management Service.

 

16. How much Amazon charge you for sharing their cloud space with you?

Answer: Basically for a VPN connection to your VPC, Amazon charges nearly $0.5 for an hour. There is an option to terminate your VPN connection through AWS consoled if you don’t want to charge for this.

 

AWS internet gateway pricing charges vary through different geographic locations. You’ll be charged from $0.045 up to $0.054 per gateway-hour and GBs of data processed based on your location. Similarly, in the case of VPC peering pricing, the rates depend on the location of VPCs and peering connection. If both are in the same region, the charge of transferring data within a peering connection remains same as the transfer of data within the zone itself.

 

In case if they are placed in different regions, region data rate costs will apply. You may come across at least one question based on VPC peering pricing so here we’ve covered it under the most common AWS VPC interview questions and answers.

 

17. What is PrivateLink from AWS?

Answer: PrivateLink provides utmost availability and scalability for AWS customers to access their services maintaining the traffic within the AWS network. It delivers private connections between VPCs, on-premises applications, etc. securely on Amazon network.

 

18. What is ClassicLink in VPC?

Answer: If you want to connect Amazon EC2-classic instances to VPC, you have to use ClassicLink. This work only within the same region and this makes use of private IP addresses. Its working is simple- you just have to enable ClassicLink in your VPC account and associate a security group from VPC to EC2-classic instance.

 

This type of questions are the additions AWS VPC interview questions that you shouldn’t miss so prepare yourself with the answer.

 

19. What is so special about VPC that stands out it from other private clouds?

Answer: There’s no need for a particular hardware, physical data centers or virtual private networks if you want a private network within the cloud – AWS VPC will provide it. The advanced security features of VPC makes it almost invulnerable to privacy & security threats.

 

20. What is a VPS? 

Answer: Beginners who were trying AWS VPC interview questions for the first time used to get confused with this question, since these terms look similar.

 

Actually, VPS or Virtual Private Server is none other than the host server offered by web hosting companies like BlueHost and GoDaddy (These companies also provide shared hosting services wherein the server is shared by several users). Here, a single host divided to multiple virtual units, each having an independent function. Each of these units is virtual private servers which can work without depending on one another. You’ll get access to the complete physical server including root access.

 

In the case of VPC, its functions are similar to that of a VPS but its servers don’t have to place in a single location.

 

21. What exactly is AWS VPC?

Ans: Cloud computing is based on Virtual Private Cloud ( VPC). This is the basic foundation of the AWS platform. Any of the advanced services of AWS can not be accessed without a VPC network. You will get a logically isolated section dedicated to a virtual network platform. Through this cloud, businesses can access customer details and data in a single window. It provides innovative new business approaches.

22. Explain to me why Amazon thought to create VPC?

Ans: Amazon has lots of physical data centers throughout the world. Now they were looking forward to creating virtual data centers. These data centers needed virtual networks and virtual network access. To manage this virtual cloud they have created VPC which actually gives access to clients in the virtual network with a private cloud zone. They kept access to other Amazon services.

23. How can you connect your dedicated VPC network to the internet?

 

Yes, we can use AWS VPC to enable our internet gateway. It gives permission to EC2 occurrences in VPC to directly access the internet. There are other options also.

 

We can also follow the given below steps:

 

·       By using hardware, virtual private network connection, and corporate data centers.

·       By using the internet through an internet gateway.

·       By using both the internet and corporate data center.

·       By using other VPC peering conditions.

·       By using other AWS.

 

24. What steps need to be followed while setting up VPC?

Ans: If we want to build up our custom VPC, please follow the given below steps:

 

1.       First, we need to create a virtual private cloud.

2.      After that need to create subnets.

3.      Now need to create an internet gateway.

4.      Need to attach internet gateway with VPC.

5.      Need to create a routing table.

6.      Now add that created gateway in the new route table.

7.      Do subnet association with the routing table.

8.     Need to create a database server for the private subnet and a web server for the public subnet.

9.      Need to create a new secured group of NAT.

10.  Need to add HTTP and HTTPS inbound rules to allow traffic from private subnet IP.

11.   Need to create elastic IP.

12.  Tag this elastic IP with NAT.

13.  Now deactivate the check for NAT.

14.  Need to add this NAT in the base route table initially.

25. Is it secure if we run an EC2 instance with AWS VPC?

 

AWS EC2 instances are very secure for the AWS VPC network. It can control both inbound and outbound traffic in the same zone. Once the EC2 instance declined any traffic, further, that traffic is not allowed.

26. Tell me the differences between security groups in VPC and ACLS in VPC?

 

VPC Security group

VPC ACLS

1. Fix the traffic coming from EC2 instances.

1. Fix the traffic coming from Subnet.

2. It can be used to set only allow.

2. It can be used to set allow and deny both.

3. Filter traffic between the same instances in the same Subnet.

3. Doesn’t filter traffic between the same instances in the same Subnet.

4. Perform stateful filtering.

4. Perform stateless filtering.

 

27. How can you find out the available zones for your Subnet?

Ans: Always keep remembering that while we are creating a subnet we need to mention the available zone. By using VPC Wizard, we can choose an available zone for the subnet. We can specify the available zone by using the API or CLI. If we don’t mention the available zone, then by default no permission options will be activated. The system will be choosing the available zone.


28. Explain default VPC?

Ans: Default VPC means, it has been created by the system when one user is accessing first time any EC2 instance. Then one isolated virtual network will be created automatically in the same AWS VPC account.

29. Do we use existing AWS EBS snapshots?

Obliviously, we can use existing AWS EBS snapshots if they are from the same VPC zone.

30. How can you use AWS EC2 reversed instance with AWS VPC?

Ans: We can use AWS EC2 reversed instances if we do have purchased instances. AWS doesn’t look at whether we are buying instances run in AWS VPC or Standard AWS EC2. By default, AWS will charge for lower reversed instances, so we need to pay the lowest amount. But it depends upon the AWS VPC specified.

31. Explain the classic link?

Ans: AWS VPC classic link is most important to connect EC2 instance classic form with the VPC using IP address. We need to activate this link in the VPC account. All by default rules will be applicable as per the VPC security group between the EC2 classic instance and the instance in the VPC.

32. Explain to me how we use a classic link?

Ans: If we want to use a classic link, then we need to activate at least one VPC in our account, particularly for the classic link. Now we need to tag one security group from the VPC with the expected classic link. Now our EC2 classic instance is connected to a VPC. This classic link is now a member of a security group in VPC.  Please remember that the EC2 classic instance can not be connected to more than one VPC at a time.

 

33. Is there a VPC for which we can not connect the classic link?

Ans: Yes, we can not connect classic links with classes inter-domain routing. That router range will be 10.0.0.0/8, with the exception of 10.0.0.0/16 and 10.1.0.0/16. Even if the VPC route table entry points to 10.0.0.0/8 classless inter-domain routing space to target other than local only.

 

34. Explain the data pipeline in AWS VPC?

It allows users to integrate data speed within multiple AWS services. It also analyzes from a single location. We can use a data pipeline to access the source directly. In this case, the data transfer efficiency level will be increased in AWS VPC.

 

CTA: Major growth factors of the Virtual Private Cloud market are ready to make your career uplift in the current era.


No comments:

Post a Comment