Comment

Anonymous

buffer = io.BytesIO(obj.get()["Body"].read())
This line reads the file into memory.
Put a print statement before and after and try on a large file and you will see.