AWS Certified Advanced Networking – Specialty (ANS-C00) — Question 89

You need to find the subnet, the security group and the VPC that your instance is associated with. You only have access to the terminal of an instance with an admin role attached.
What is the first part of the command you would use?

Answer options

Correct answer: B

Explanation

The command 'aws ec2 describe-instances' is the correct choice because it provides information about the instance, including its associated subnet, security group, and VPC. The other options do not directly retrieve instance-specific details, making them unsuitable for the task at hand.