def METHOD_NAME(event):
    """
    Delete artifacts under the directory that is passed in.
    It exits gracefully if directory does not exist.
    :param bucket_name: bucket containing cluster artifacts
    :param artifact_directory: directory containing artifacts to delete
    """
    bucket_name = event["ResourceProperties"]["ResourcesS3Bucket"]
    artifact_directory = event["ResourceProperties"]["ArtifactS3RootDirectory"]
    try:
        if bucket_name != "NONE":
            bucket = boto3.resource("s3", config=boto3_config).Bucket(bucket_name)
            logger.info("Cluster S3 artifact under %s/%s deletion: STARTED", bucket_name, artifact_directory)
            bucket.objects.filter(Prefix=f"{artifact_directory}/").delete()
            bucket.object_versions.filter(Prefix=f"{artifact_directory}/").delete()
            logger.info("Cluster S3 artifact under %s/%s deletion: COMPLETED", bucket_name, artifact_directory)
    except boto3.client("s3").exceptions.NoSuchBucket as ex:
        logger.warning("S3 bucket %s not found. Bucket was probably manually deleted.", bucket_name)
        logger.warning(ex, exc_info=True)
    except Exception as e:
        logger.error(
            "Failed when deleting cluster S3 artifact under %s/%s with error %s", bucket_name, artifact_directory, e
        )
        raise