Use VPC endpoints for S3 and Systems Manager plus VPC peering to the patch source
A company is changing the way that it handles patching of Amazon EC2 instances in its application account. The company currently patches instances over the internet by using a NAT gateway in a VPC in the application account. The company has EC2 instances set up as a patch source repository in a dedicated private VPC in a core account. The company wants to use AWS Systems Manager Patch Manager and the patch source repository in the core account to patch the EC2 instances in the application account. The company must prevent all EC2 instances in the application account from accessing the internet. The EC2 instances in the application account need to access Amazon S3, where the application data is stored. These EC2 instances need connectivity to Systems Manager and to the patch source repository in the private VPC in the core account. Which solution will meet these requirements?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
VPC interface endpoints give instances private access to S3 and Systems Manager without any internet path, and VPC peering provides the private route to the core account's patch source instances, so the NAT gateway can be deleted entirely.
A company patches EC2 instances today through a NAT gateway to the internet and wants to switch to Systems Manager Patch Manager using a patch source repository hosted on EC2 in a dedicated private VPC in a core account. Instances in the application account must have no internet access, must reach S3, must reach Systems Manager, and must reach the patch source repository.
Blocking port 80 with a network ACL. A network ACL deny on a single port does not remove internet access, because traffic to other ports and to other destinations still reaches the internet, so it cannot satisfy the requirement that no instance may access the internet. Creating private VIFs also does not exist as a per-service construct for S3 and Systems Manager.
Community Discussion (5 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Two interface VPC endpoints are created, one for Amazon S3 and one for Systems Manager, so the application account instances reach both services over the AWS network using private addresses. Because the endpoints supply the routes to those services, the NAT gateway can be deleted, which is what actually removes the instances' internet access rather than merely filtering a port. To reach the patch source repository, a VPC peering connection gives a private path between the application VPC and the private VPC in the core account holding those EC2 instances, and the route tables in both accounts direct the patch traffic over the peering connection. That satisfies all three connectivity requirements with no internet exposure.Why the Other Options Are Wrong
A: A network ACL blocking outbound port 80 does not eliminate internet access, since other outbound ports and destinations remain open, and deploying custom VPN servers in both accounts introduces a network appliance the company has to operate when VPC connectivity is already available. D: Blocking inbound port 80 is even less relevant, because the patching flow is outbound from the instances, so an inbound deny does not stop the instances from reaching the internet, and it also relies on a transit gateway where a peering connection is the simpler match. B: Private VIFs are a Direct Connect construct for linking an on-premises network, not a per-service endpoint for S3 and Systems Manager, so the described private VIFs for those two services do not exist, and a transit gateway is unnecessary for reaching a single peer VPC.Community Comment Notes
The community voted 100 to 0 for C, and the top-voted comment explained that once the NAT gateway is deleted there is no need to block port 80 at all, because the VPC interface endpoints keep the traffic private, and linked the Systems Manager documentation on creating a VPC endpoint. Another commenter enumerated the other options' failures, that blocking a port is not sufficient and that private VIFs is the wrong mechanism.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →