exam questions

Exam AWS Certified Solutions Architect - Associate SAA-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Associate SAA-C02 exam

Exam AWS Certified Solutions Architect - Associate SAA-C02 topic 1 question 301 discussion

A user wants to list the IAM role that is attached to their Amazon EC2 instance. The user has login access to the EC2 instance but does not have IAM permissions.
What should a solutions architect do to retrieve this information?

  • A. Run the following EC2 command: curl http://169.254.169.254/latest/meta-data/iam/info
  • B. Run the following EC2 command: curl http://169.254.169.254/latest/user-data/iam/info
  • C. Run the following EC2 command: http://169.254.169.254/latest/dynamic/instance-identity/
  • D. Run the following AWS CLI command: aws iam get-instance-profile --instance-profile-name ExampleInstanceProfile
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
toto059
Highly Voted 3 years, 8 months ago
A for sure
upvoted 20 times
Heyang
3 years, 7 months ago
Why not C?
upvoted 1 times
DS01
3 years, 7 months ago
Dynamic data categories https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html#dynamic-data-categories
upvoted 1 times
...
...
...
algreat
Highly Voted 3 years, 8 months ago
A https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html
upvoted 6 times
dave0808
3 years, 8 months ago
Thank you this helps
upvoted 2 times
...
noahsark
3 years, 8 months ago
i tested as below: :\Users\Administrator>curl http://169.254.169.254/latest/meta-data ami-id ami-launch-index ami-manifest-path block-device-mapping/ events/ hibernation/ hostname identity-credentials/ instance-action instance-id instance-life-cycle instance-type local-hostname local-ipv4 mac metrics/ network/ placement/ profile public-hostname public-ipv4 public-keys/ reservation-id security-groups services/
upvoted 14 times
patriktre
3 years, 7 months ago
why did you listed all metadata but not the one the question is about? :) iam/security-credentials/role-name - this is the one we need and yes, it is in metadata. so A is correct definitely
upvoted 3 times
...
...
...
Ivanyan
Most Recent 3 years, 3 months ago
Selected Answer: A
A is correct answer
upvoted 1 times
...
FF11
3 years, 4 months ago
Selected Answer: A
A is the answer. Instance metadata categories will provide information about IAM roles attached to an EC2 instance.
upvoted 2 times
...
FF11
3 years, 4 months ago
Selected Answer: A
A is correct. IAM roles can be listed in IAM/info
upvoted 2 times
...
nazree
3 years, 5 months ago
A is the answer
upvoted 1 times
...
jkwek
3 years, 7 months ago
Answer is A. Details is in url: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html GET http://169.254.169.254/latest/meta-data/XXX
upvoted 6 times
...
freemun05
3 years, 7 months ago
LOL , nobody before me didn't even bother to check ))) It's D actually Create instance and check for yourself
upvoted 1 times
freemun05
3 years, 7 months ago
disregard please the above I used real IP not 169 IP
upvoted 3 times
...
...
syu31svc
3 years, 7 months ago
https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_iam-ec2.html#troubleshoot_iam-ec2_no-keys Answer is A
upvoted 3 times
...
Atanu_M
3 years, 7 months ago
A. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html
upvoted 3 times
...
Yogi
3 years, 7 months ago
Ans=A. Run the following EC2 command: curl http://169.254.169.254/latest/meta-data/iam/info
upvoted 3 times
...
CCNPWILL
3 years, 8 months ago
A is the answer!
upvoted 4 times
...
CountryGent
3 years, 8 months ago
Indeed A
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...