Bird
0
0

Which of the following is a valid way to access instance metadata from within an EC2 instance?

easy📝 Conceptual Q2 of 15
AWS - EC2 Fundamentals
Which of the following is a valid way to access instance metadata from within an EC2 instance?
Acurl http://169.254.169.254/latest/meta-data/
Bcurl http://localhost/latest/user-data/
Ccurl http://aws.amazon.com/instance-metadata/
Dcurl http://metadata.aws/latest/
Step-by-Step Solution
Solution:
  1. Step 1: Recall the metadata IP address

    The special IP 169.254.169.254 is used inside EC2 to access metadata.
  2. Step 2: Verify the URL path

    The path /latest/meta-data/ is the correct endpoint for metadata access.
  3. Final Answer:

    curl http://169.254.169.254/latest/meta-data/ -> Option A
  4. Quick Check:

    Metadata IP = 169.254.169.254 [OK]
Quick Trick: Metadata IP is always 169.254.169.254 inside EC2 [OK]
Common Mistakes:
MISTAKES
  • Using localhost instead of metadata IP
  • Using incorrect URLs outside AWS docs
  • Confusing user data URL with metadata URL

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes