title: Using AWS Ruby SDK, how can one get the current user's details?
body: <p>As can be seen in <a href="https://stackoverflow.com/questions/10197784/how-can-i-deduce-the-aws-account-id-from-available-basicawscredentials">this question</a>, the Java SDK has a <a href="http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/identitymanagement/AmazonIdentityManagement.html#getUser%28%29" rel="nofollow noreferrer">method to retrieve the current user based on the request's credentials</a>. Is there a way to do something similar using the Ruby SDK?</p>
  
  <p>I've tried <code>AWS::IAM.new(creds).access_keys[creds[:access_key_id]]</code>, but that returns a simple object that answers <code>nil</code> to <code>user</code> or <code>user_name</code>, and my user doesn't have the <code>iam:ListUsers</code> permission so I can't enumerate the users collection.</p>
  
  <p>Basically I need that information because I want to generate a self-approving policy to be attached to some new resources, and I need to fetch the ARN that my configured access key is associated with. Any suggestions?</p>