title: AWS Cloudformation: How to use username as a tag
body: <p>I need to create a Cloudformation Script for an ec2 instance which should have tags specifying among other things, the aws username of the person who ran the script to create the instance. What is the variable name to get the IAM Username? The tagging part of my script is shown below. Whereas the AccountId can be retrieved, I'm unable to get the username. </p>
  
  <pre><code>    Tags:
      - Key: Name
        Value: !Ref InstanceName
      - Key: team
        Value: !Ref Team
      - Key: awsAccount
        Value: !Sub ${AWS::AccountId}
      - Key: userName
        Value: !Sub ${AWS::IAM::User}
      - Key: purpose
        Value: !Ref Purpose
  </code></pre>