def attach_user_policy(iam, policy_arn, user_name):
    """
    Attach a managed policy (specified by ARN) to a user (specified by
    user name).
    """
    return iam.get_response('AttachUserPolicy', {'PolicyArn': policy_arn,
        'UserName': user_name})
