def delete_user(user, iam_client):
    """
    Strip user attributes and delete user.  Attributes include:

        Access keys (DeleteAccessKey)
        Attached managed policies (DetachUserPolicy)
        Group memberships (RemoveUserFromGroup)
        Multi-factor authentication (MFA) device (DeactivateMFADevice, DeleteVirtualMFADevice)
        Inline policies (DeleteUserPolicy)
        Signing certificate (DeleteSigningCertificate)
        Password (DeleteLoginProfile)
        SSH public key (DeleteSSHPublicKey)
        Git credentials (DeleteServiceSpecificCredential)

    :param: user
    :type:  boto3 iam User resource object
    """
    try:
        user.load()
    except user.meta.client.exceptions.NoSuchEntityException:
        return
    for x in user.access_keys.all():
        x.delete()
    for x in user.attached_policies.all():
        x.detach_user(UserName=user.name)
    for x in user.groups.all():
        x.remove_user(UserName=user.name)
    for x in user.mfa_devices.all():
        x.disassociate()
    for x in user.policies.all():
        x.delete()
    for x in user.signing_certificates.all():
        x.delete()
    profile = user.LoginProfile()
    try:
        profile.load()
        profile.delete()
    except profile.meta.client.exceptions.NoSuchEntityException:
        pass
    response = iam_client.list_ssh_public_keys(UserName=user.name)
    if 'SSHPublicKeys' in response and response['SSHPublicKeys']:
        for key in response['SSHPublicKeys']:
            iam_client.delete_ssh_public_key(UserName=user.name,
                SSHPublicKeyId=key['SSHPublicKeyId'])
    response = iam_client.list_service_specific_credentials(UserName=user.name)
    if 'ServiceSpecificCredentials' in response and response[
        'ServiceSpecificCredentials']:
        iam_client.delete_service_specific_credential(UserName='string',
            ServiceSpecificCredentialId=response[
            'ServiceSpecificCredentials']['ServiceSpecificCredentialId'])
    user.delete()
