I'm trying to run a diff on two files that are stored in S3, and would like to avoid downloading the files if possible.
The sample code I am working with is as so:
import difflib
file1 = open('sample1.csv', 'r');
file2 = open('sample2.csv', 'r');
diff = difflib.ndiff(file1.readlines(), file2.readlines())
I see with boto3 package, I can open the file from S3, but how can I pass the equivalent of file1.readlines() and file2.readlines() into the ndiff function?