A user has created a public subnet with VPC and launched an EC2 instance within it. The user is trying to delete the subnet. What will happen in this scenario?
A. It will delete the subnet as well as terminate the instances
B. The subnet can never be deletedindependently, but the user has to delete the VPC first
C. It will not allow the user to delete the subnet until the instances are terminated
D. It will delete the subnet and make the EC2 instance as a part of the default subnet
Answer:C
A user has created a public subnet with VPC and launched an EC2 instance within it. The user is trying to delete the subnet. What will happen in this scenario?
A. It will delete the subnet as well as terminate the instances B. The subnet can never be deletedindependently, but the user has to delete the VPC first C. It will not allow the user to delete the subnet until the instances are terminated D. It will delete the subnet and make the EC2 instance as a part of the default subnet
Explanation: A Virtual Private Cloud (VPC. is a virtual network dedicated to the user's AWS account. A user can create a subnet with VPC and launch instances inside that subnet. When an instance is launched it will have a network interface attached with it. The user cannot delete the subnet until he terminates the instance and deletes the network interface.