Explain the TWO purposes of an Internet Gateway and how it interacts with route tables.
How would you make a subnet public? Give the full configuration steps.
A subnet becomes public when:
It has a route table with a route to an Internet Gateway (0.0.0.0/0 → IGW)
Instances in the subnet have public IPv4 or Elastic IP addresses
Why can a subnet NOT be considered public just by attaching an Internet Gateway to the VPC?
Because the subnet must explicitly use a route table that directs internet traffic to the IGW. Without this route, traffic cannot leave the subnet.
Explain the purpose of a NAT Gateway and how it differs from an Internet Gateway.
NAT Gateway:
* Allows private subnet instances to access the internet
* Blocks incoming connections from the internet
Internet Gateway:
* Allows both inbound and outbound communication (if permitted)
Why must a NAT Gateway be placed in a public subnet?
Because it needs direct access to the Internet Gateway to forward traffic from private subnets to the internet.
What additional requirement is needed when creating a NAT Gateway, and why?
An Elastic IP address must be attached.
Reason:
It provides a static public IP for outbound communication.
After creating a NAT Gateway, what must be updated for private subnets to access the internet?
The route table associated with private subnets must include:
0.0.0.0/0 → NAT Gateway
Explain what VPC sharing is and its purpose.
VPC sharing allows multiple AWS accounts in the same organisation to use subnets within a shared VPC.
Purpose:
* Centralised networking
* Resource sharing across accounts
Why does AWS recommend using a NAT Gateway instead of a NAT Instance?
Because NAT Gateway:
* Is managed by AWS
* Provides higher availability
* Offers better bandwidth
* Requires less administrative effort
What permissions do participants have in shared subnets?
They can:
* View
* Create
* Modify
* Delete resources within the shared subnets
Explain VPC peering and its main function.
VPC peering connects two VPCs to allow private communication using internal IP addresses, as if they are in the same network.
How do route tables enable communication in VPC peering?
Each VPC must add a route:
* Destination → other VPC CIDR block
* Target → Peering connection ID
List THREE restrictions of VPC peering.
CIDR blocks must not overlap
Only one peering connection per VPC pair
No transitive peering (A → B → C is NOT allowed)
Explain what “no transitive peering” means with an example.
If VPC A is connected to B, and B to C,
A cannot communicate with C through B.
How can a VPC connect to an on-premises (remote) network?
Using a Site-to-Site VPN:
Steps:
* Attach Virtual Private Gateway to VPC
* Configure route tables
* Update security groups
* Configure VPN connection
What is a major limitation of VPN connections in cloud networking?
Answer:
Performance can degrade due to internet latency, especially if the data centre is far from the AWS region
What is AWS Direct Connect and when should it be used?
A dedicated private connection between on-premises infrastructure and AWS.
Used when:
* Low latency is required
* Stable and consistent performance is needed
What is a VPC Endpoint (Gateway Endpoint) and what is its purpose?
A gateway that allows access to AWS services (e.g., S3, DynamoDB) without using the internet.
Why is traffic through a VPC Endpoint considered more secure?
Because it does not leave the AWS network, reducing exposure to public internet threats.
What is AWS PrivateLink and how does it improve security?
PrivateLink provides private connectivity to AWS services and applications via VPC interface endpoints.
It improves security by:
* Eliminating exposure to the public internet
* Keeping traffic within AWS infrastructure
Compare VPC Peering vs PrivateLink in terms of connectivity.
VPC Peering:
* Full network-to-network connection
* Bidirectional
PrivateLink:
* Service-level connection
* More controlled and secure
* No full network exposure
A company wants private instances to access the internet but prevent inbound connections. Design the architecture.
Private subnet → NAT Gateway
Public subnet → Internet Gateway
If a private subnet has a route to an Internet Gateway, will it work? Why or why not?
No.
Because instances do not have public IP addresses, so they cannot communicate directly with the internet even if the route exists.
Why is Elastic IP important in NAT Gateway architecture but not necessarily in public instances?
Because NAT Gateway requires a static public IP to represent all private instances, whereas public instances can use dynamic public IPs.