A company is changing how it patches EC2 instances. Currently instances patch over the internet via a NAT gateway in the application account's VPC. A dedicated private VPC in a core account hosts EC2 instances acting as a patch source repository. The company wants to use Systems Manager Patch Manager and the core account patch repository to patch EC2 instances in the application account, while preventing all instances in the application account from accessing the internet. The instances still need access to Amazon S3 (where application data is stored), Systems Manager, and the patch repository in the core account. Which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Create VPC endpoints for Systems Manager and Amazon S3. Delete the NAT gateway from the VPC in the application account. Create a VPC peering connection to reach the patch source repository EC2 instances in the core account. Update the route tables in both accounts..
Why this is the answer
The correct solution involves creating VPC endpoints for Systems Manager and Amazon S3 to allow private access to these AWS services without traversing the internet. Deleting the NAT gateway prevents internet access for the EC2 instances, fulfilling a key requirement. A VPC peering connection between the application and core accounts enables direct, private communication to the patch source repository EC2 instances. Updating route tables in both accounts ensures traffic is directed correctly through the VPC endpoints and peering connection. Incorrect options: Creating a network ACL to block outbound port 80 traffic is insufficient to prevent all internet access and doesn't address private access to S3, Systems Manager, or the patch repository. A custom VPN server is overly complex and unnecessary. Private VIFs are used with AWS Direct Connect, not for inter-VPC communication or private access to AWS services within a VPC. A Transit Gateway could work for inter-VPC connectivity but is not the most direct solution for this scenario, and the VIF part is incorrect. Blocking inbound port 80 traffic with a network ACL does not prevent outbound internet access and does not facilitate private access to required services.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed