Changed the signature to accept a s3 object