title: AWS-SDK v3 - Download file with Typescript
body: <p>Writing a Typescript based Lambda to download a file from a S3 bucket for processing but running into problems with the AWS SDK v3.</p>
  <p>I'm getting the error <strong>&quot;Property 'pipe' does not exist on type 'Readable | ReadableStream | Blob'. Property 'pipe' does not exist on type 'ReadableStream.&quot;</strong></p>
  <pre><code>import { S3Client, GetObjectCommand } from &quot;@aws-sdk/client-s3&quot;;
  
  const s3Client = new S3Client();        
  const command = new GetObjectCommand({ Bucket: myBucket, Key: myFile });
  
  const s3Item = await s3Client.send(command);
  s3Item.Body.pipe(createWriteStream(fileName));
  </code></pre>
  <p>Have tried using .pipeTo and .pipeThrough but they report effectively the same error.</p>
  <p>Any thoughts as to why this isn't working or how a download can be achieved via v3 of the SDK?</p>
  <p>I've had trouble finding download examples, even the official AWS Documentation covers uploading and other steps but not downloading. <a href="https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/s3-node-examples.html" rel="nofollow noreferrer">AWS S3 Examples</a></p>