title: Nodejs S3 upload list[0]" argument must be an instance of Buffer or Uint8Array
body: <p>I'm using openpgp.js to encrypt a s3 <code>getObject</code> stream. After the encryption I try to upload the encrypted stream using <code>s3.upload()</code> which results in the error:</p>
  <blockquote>
  <p>S3 upload list[0]&quot; argument must be an instance of Buffer or Uint8Array</p>
  </blockquote>
  <p>The error only shows up if I use the option <code>armor: true</code> (which I want) in the encryption stream.
  Here is the relevant extract from the code:</p>
  <pre><code>let encryptionStream = await openpgp.encrypt({        
          message: pgpMessage,
          publicKeys: publicKey,
          privateKeys: privateKey,
          streaming: 'node',        
          armor: true  
  });
  
  var uploadObjectAsync = async (s3Params) =&gt; new Promise((resolve, reject) =&gt; {
          s3.upload(s3Params, (err, data) =&gt; {
              if(err) reject(err);
              resolve(data);
          });
  });
  
  await uploadObjectAsync({'Bucket': 'test-upload', 'Key': 'encrypted_file', 'Body': encryptionStream, });
  </code></pre>
  <p>I also took a look at this github issue but using <code>encryptionStream.setEncoding(null)</code> still results in the same error
  <a href="https://github.com/aws/aws-sdk-js/issues/2081" rel="nofollow noreferrer">https://github.com/aws/aws-sdk-js/issues/2081</a></p>