Top AWS VPC Interview Questions and Answers (2021)
In this post, questions from AWS VPC Interviews will be answered for Experienced and Freshers. We're trying to share our experience and learn how to help you make progress in your career.
- What is VPC in AWS?
- What is a VPC subnet?
- What is VPC and what are its benefits?
- What is the difference between EC2 and VPC?
- What is difference between VPC and subnet?
- How many subnets can a VPC have? OR How many subnets can we create per VPC?
- How do you connect multiple sites to a VPC?
- What are the ways to monitor Amazon VPC?
- What are the components of VPC?
- The server is not being resolved by VPC using DNS. What is the problem, and how do you solve it?
- What are Security Groups in VPC?
Q: What is VPC in AWS?
Amazon VPC (Amazon Virtual Private Cloud) is a service that allows you to launch AWS resources in a logically isolated virtual network that you identify. Most services in your virtual private cloud can use both IPv4 and IPv6, ensuring safe and convenient access to resources and applications.
Q: What is a VPC subnet?
A VPC is a virtual private cloud (VPC) that spans an AWS region. There are two or more availability zones in a region. Subnets within a VPC are used to logically isolate resources within a region. A subnet can't be shared by more than one availability region. Depending on its accessibility from outside of VPC and whether it can access resources outside of VPC, a subnet can be classified as either a private or public subnet.
In VPC, a subnet is an important part. A VPC may contain all public subnets (or a mix of public and private subnets). A subnet that does not have a route to the internet gateway is known as a private subnet. By routing traffic via a virtual private gateway, a subnet can be configured as a VPN-only subnet.
Q: What is VPC and what are its benefits?
The advantage of VPC is that it aids in aspects of cloud computing such as privacy, protection, and preventing data loss. An IGW is a VPC component that allows communication between instances and the internet. It is horizontally scaled, redundant, and highly accessible. At any given time, only one IGW can be attached to a VPC.
Take a look at our suggested post on Java :
Q: What is the difference between EC2 and VPC?
Amazon EC2Your instances run in a single, flat network that you share with other customers when you use EC2-Classic.
Amazon VPCYour instances run in a virtual private cloud (VPC) that is logically separate from your AWS account when you use Amazon VPC.
Q: What is difference between VPC and subnet?
VPC comes with a default network ACL that can be modified. By default, it makes both inbound and outbound IPv4 traffic, as well as IPv6 traffic if necessary. One subnet can only connect with a single ACL but a single ACL can have multiple subnets. Subnetwork or subnet is a logical subdivision of an IP network.
Q: How many subnets can a VPC have? OR How many subnets can we create per VPC?
Currently, user can create 200 subnets per VPC. If want to create more, need to submit a case at the support center.
Q: How do you connect multiple sites to a VPC?
To have multiple VPN connections, use AWS VPN CloudHub to provide secure communication between sites.
Q: What are the ways to monitor Amazon VPC?
In below ways we can monitor VPC:
- CloudWatch and CloudWatch logs
- VPC Flow Logs
Q: What are the components of VPC?
AWS VPC is made up of multiple networking components, some of which are as follows:
Elastic network interfaces
Elastic IP addresses
Q: The server is not being resolved by VPC using DNS. What is the problem, and how do you solve it?
To solve this issue, you must enable DNS hostname resolution, which will resolve the issue on its own.
Q: What are Security Groups in VPC?
A security group functions as a virtual firewall for your instance to control inbound and outbound traffic. To launch an instance in a VPC, it can assign up to five security groups to the instance. Security groups act at the instance level, not the subnet level. As a result, each instance in a subnet in your VPC can be assigned to a different set of security groups.
If want to launch an instance using the Amazon EC2 API or a command line tool and no need to specify a security group, the instance is automatically assigned to the default security group for the VPC.
If want to launch an instance using the Amazon EC2 console, we have an option to create a new security group for the instance.