Bird
0
0

You want to provide internet access to instances in a public subnet of your VPC. Which combination of steps is required to achieve this?

hard📝 Best Practice Q15 of 15
AWS - VPC Fundamentals
You want to provide internet access to instances in a public subnet of your VPC. Which combination of steps is required to achieve this?
ACreate a VPN connection and update the route table to route 0.0.0.0/0 to the VPN
BCreate a NAT Gateway, attach it to the VPC, and assign private IPs to instances
CAttach an Internet Gateway to the subnet directly and assign Elastic IPs to instances
DCreate and attach an Internet Gateway to the VPC, update the subnet's route table to route 0.0.0.0/0 to the Internet Gateway, and ensure instances have public IPs
Step-by-Step Solution
Solution:
  1. Step 1: Attach Internet Gateway to VPC

    Internet Gateway must be created and attached to the VPC to enable internet connectivity.
  2. Step 2: Update subnet route table

    The route table for the public subnet must have a route sending all internet-bound traffic (0.0.0.0/0) to the Internet Gateway.
  3. Step 3: Assign public IPs to instances

    Instances need public IP addresses to communicate over the internet directly.
  4. Final Answer:

    Create and attach an Internet Gateway to the VPC, update the subnet's route table to route 0.0.0.0/0 to the Internet Gateway, and ensure instances have public IPs -> Option D
  5. Quick Check:

    IGW + route + public IP = internet access [OK]
Quick Trick: Internet Gateway + route + public IP = public internet access [OK]
Common Mistakes:
MISTAKES
  • Confusing NAT Gateway with Internet Gateway for public subnet
  • Trying to attach IGW to subnet directly
  • Forgetting to assign public IPs to instances

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes