def get_key(iam, user):
    """
    Return all the access keys of the given user
    """
    keys = []
    paginator = iam.get_paginator('list_access_keys')
    for access_key in paginator.paginate(UserName=user['UserName']):
        for key in access_key['AccessKeyMetadata']:
            keys.append(key)
    return keys