A company has a three-tier web application running on EC2 instances within a VPC. The web tier is in a public subnet, and the application and database tiers are in private subnets. The application instances need to download software patches from the internet, but under no circumstances should they be directly accessible from the internet. Which VPC component should be configured to allow this access?
-
A
An Internet Gateway attached to the private subnets.
-
B
A NAT Gateway placed in the public subnet with a route from the private subnets.
-
C
A VPC Peering connection to another VPC that has internet access.
-
D
An Egress-Only Internet Gateway.