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
- A. aws ec2 describe-network-acl
- B. aws ec2 describe-instances
- C. aws vpc describe-all
- D. aws ec2 describe-security-groups
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.