def METHOD_NAME(self, bucket_idx, key, filepath):
    # Skip upload when using cached buckets and not updating storage.
    if self.cached and not self.replace_existing:
        return
    bucket_name = self.input_buckets[bucket_idx]
    if not self.replace_existing:
        if "Contents" in self.input_buckets_files[bucket_idx]:
            for f in self.input_buckets_files[bucket_idx]["Contents"]:
                f_name = f["Key"]
                if key == f_name:
                    self.logging.info(
                        "Skipping upload of {} to {}".format(filepath, bucket_name)
                    )
                    return
    bucket_name = self.input_buckets[bucket_idx]
    self.upload(bucket_name, filepath, key)