def detach_and_delete_iam_policy(config, iam):
    """ Detaches policy from Redshift role & deletes the policy

    Args:
        config: a ConfigParser object
        iam: a boto3 client object for the AWS IAM service

    Returns:
        dict with AWS API response
    """
    try:
        print("Detaching policy: ", config['IAM_ROLE']['POLICY_NAME'])
        iam.detach_role_policy(RoleName=config['IAM_ROLE']['NAME'],
                               PolicyArn=config['IAM_ROLE']['POLICY_ARN'])

        print("Deleting policy: ", config['IAM_ROLE']['POLICY_NAME'])
        return iam.delete_policy(PolicyArn=config['IAM_ROLE']['POLICY_ARN'])
    except Exception as e:
        print(e)