Made AwsS3::write use the writeObject function like ::writeStream