What should a solutions architect do to retrieve this information?

September 16, 2021 by Admin

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?

  • Run the following EC2 command:
    curl http://169.254.169.254/latest/meta-data/iam/info
  • Run the following EC2 command:
    curl http://169.254.169.254/latest/user-data/iam/info
  • Run the following EC2 command:
    http://169.254.169.254/latest/dynamic/instance-identity/
  • Run the following AWS CLI command:
    aws iam get-instance-profile –instance-profile-name ExampleInstanceProfile

Leave a Reply