'Retrieve instance\'s IAM role.
Raise `NoIAMRole` when unavailable.'

@staticmethod
def get_iam_role():

    try:
        r = requests.get((EC2.METADATA_URL_BASE + '/iam/security-credentials/'))
        r.raise_for_status()
        return r.content.strip()
    except requests.exceptions.HTTPError as e:
        log.debug('Collecting    IAM    Role    failed    %s', str(e))
        if (e.response.status_code == 404):
            raise EC2.NoIAMRole()
        raise
