I read the filenames in my S3 bucket by doing
objs = boto3.client.list_objects(Bucket='my_bucket')
while 'Contents' in objs.keys():
objs_contents = objs['Contents']
for i in range(len(objs_contents)):
filename = objs_contents[i]['Key']
Now, I need to get the actual content of the file, similarly to a open(filename).readlines(). What is the best way?