title: Given an AWS Access / Secret Key Pair, how do I retrieve its IAM permissions?
body: <p>Given the input of just an AWS Access Key and an AWS Secret Key, how can I use the AWS SDK to lookup what kind of permissions that the account can do? </p>
  
  <p>I want do XYZ for a customer so the customer needs to give the access key and secret key to me to perform XYZ programmatically. However, before trying to do any of those actions, I'd like to verify that the credentials they gave me have access to certain privileges, such as being able to create S3 objects or being able to launch an EC2 instance.</p>
  
  <p>That way, I can validate if the access key and secret key has permission to do something before I do it on their behalf.</p>