Exam SOA-C02 All QuestionsBrowse all questions from this exam
Question 120

A company has an application that is running on Amazon EC2 instances in a VPC. The application needs access to download software updates from the internet. The VPC has public subnets and private subnets. The company’s security policy requires all EC2 instances to be deployed in private subnets.

What should a SysOps administrator do to meet these requirements?

    Correct Answer: C

    To enable EC2 instances in private subnets to download software updates from the internet while meeting the company's security policy requiring all instances to be in private subnets, a NAT gateway should be added to a public subnet. The reason is that a NAT gateway must reside in a public subnet to have access to an internet gateway, which allows it to facilitate internet access for instances in private subnets. The route table for the private subnets should then be updated to route internet-bound traffic through this NAT gateway, allowing the instances to download updates without exposing them directly to the internet.

Discussion
sxtiOption: C

The correct answer is C. Add a NAT gateway to a public subnet. In the route table for the private subnets, add a route to the NAT gateway. The application needs to be able to download updates from the internet, but it's running on EC2 instances in a private subnet. Private subnets do not have direct access to the internet. A NAT gateway allows instances in a private subnet to connect to the internet or other AWS services but prevent the internet from initiating a connection with those instances.

skywalkerOption: C

CCCCCCCCC

jessbase2022Option: C

C https://aws.amazon.com/premiumsupport/knowledge-center/nat-gateway-vpc-private-subnet/

JamesF92Option: C

https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-scenarios.html This one is definitely C.

MrMLBOption: B

To meet the requirements of the company's security policy, the SysOps administrator should choose option B: Add a NAT gateway to a private subnet. In the route table for the private subnets, add a route to the NAT gateway. In this scenario, the EC2 instances in the private subnets need access to the internet to download software updates, but they cannot be directly connected to the internet. A NAT gateway allows the EC2 instances to connect to the internet indirectly by routing their traffic through the NAT gateway, which is located in a public subnet. The NAT gateway has a direct connection to the internet, so it can access the internet on behalf of the EC2 instances. To set this up, the SysOps administrator should create a NAT gateway in a private subnet and then add a route to the NAT gateway in the route table for the private subnets. This will allow the EC2 instances in the private subnets to access the internet through the NAT gateway.

henryford

You can't use a NAT gateway in a private subnet as it needs a public IP address to work.

michaldavidOption: C

cccccccc

tts1234Option: C

A Nat Gateway enables instances in private subnets to connect to the internet. The Nat gateway must be deployed in the public subnet with an Elastic IP. Once the resource is created, a route table associated with the the private subnet needs to point internet-bound traffic to the NAT gateway. https://towardsdatascience.com/connecting-to-an-ec2-instance-in-a-private-subnet-on-aws-38a3b86f58fb

Rabbit117Option: C

C is correct. The NAT Gateway is deployed in the Public subnet and the route table for the private subnet points all internet bound traffic to the NAT GW.

stoy123Option: C

C, NAT Gateway must be created in a public subnet

vinothc

To enable the EC2 instances in private subnets to download software updates from the internet, a SysOps administrator should add a NAT gateway to a private subnet, and in the route table for the private subnets, add a route to the NAT gateway. Therefore, option B is the correct answer. Option A is incorrect because adding an internet gateway to the VPC and a route to the internet gateway in the private subnet's route table would not work since the private subnet does not have a public IP address. Option C is incorrect because adding a NAT gateway to the public subnet and a route to the NAT gateway in the private subnet's route table would not work because the private subnet requires outbound traffic to traverse the NAT gateway, which would be difficult to implement in a security perspective. Option D is incorrect because having two internet gateways is not practical and would not resolve the issue of allowing private instances to download software updates from the internet.

henryford

This is why I'm not afraid that ChatGPT will replace us soon. Option B is clearly wrong as your NAT gateway must have a public IP. The reasoning behind why Option C is also clearly incorrect as a route in the routing table would obviously cause the traffic to be routed through the NAT gateway.

GomerOption: C

Can't be D. Can have only one IGW per VPC. Need IGW and route to a NAT Gateway from private subnet.

10cc6baOption: C

C is correct

fazlur21

B why? because a public subnet don't need nat gateway, only private subnets need a nat gateway to connect to the internet

wookchan

No. The NAT gateway must be deployed in a public subnet, because it needs to be connected to the Internet Gateway.