Interview Q&A / AWS & Cloud
AWS & Cloud interview questions
EC2, S3, Lambda, IAM and VPC basics, with when to pick which service.
Prefer rapid revision? Practise AWS & Cloud short interview answers →
- What is a VPC, and what is the difference between public and private subnets?
A VPC is your own private network inside AWS. A public subnet has a route to an internet gateway, so resources with public IPs can be reached from the internet. A private subnet has no such route; its servers reach the internet only outbound, through a NAT gateway placed in a public subnet.
IntermediateIn-depth4 min read - What is the difference between a security group and a network ACL in AWS?
A security group is a stateful firewall attached to an instance's network interface, with allow rules only. A network ACL is a stateless firewall on a subnet, with numbered allow and deny rules checked in order. Because NACLs are stateless, you must allow return traffic explicitly, usually on ephemeral ports.
IntermediateIn-depth4 min read - How many usable IP addresses does a /24 subnet in an AWS VPC have?
A /24 has 256 addresses, but AWS reserves five in every subnet, so 251 are usable. The reserved ones are the network address, VPC router, DNS, one for future use, and the broadcast address.
BeginnerQuick answer1 min read - What is the difference between an internet gateway and a NAT gateway?
An internet gateway lets resources with public IPs in a public subnet talk to the internet in both directions. A NAT gateway lets private-subnet instances start outbound connections, such as updates, while blocking inbound connections from the internet.
BeginnerQuick answer1 min read - What is the difference between VPC peering and AWS Transit Gateway?
VPC peering is a one-to-one private link between two VPCs and it is not transitive. Transit Gateway is a central hub that connects many VPCs and on-premises networks, so each network connects once.
IntermediateQuick answer1 min read - What is a VPC endpoint and what is the difference between gateway and interface endpoints?
A VPC endpoint lets resources in your VPC reach AWS services privately without an internet gateway or NAT. Gateway endpoints, for S3 and DynamoDB, are route-table entries and free. Interface endpoints use PrivateLink with a network interface and are charged.
AdvancedQuick answer1 min read