title: Running a COPY command to load gzip-ed data to Redshift in S3
body: <p>When i run my copy command to copy all the files from an S3 folder to a Redshift table it fails with <strong><code>"ERROR:  gzip: unexpected end of stream. Unknown zlib error code. zlib error code: -1"</code></strong>:</p>
  
  <pre><code>copy table_name 
      (column_list)
  from 's3://bucket_name/folder_name/'
       credentials 'aws_access_key_id=xxxxxx;aws_secret_access_key=xxxxxxxxx'
       delimiter '|' GZIP
  </code></pre>
  
  <p>However when I specify a file prefix for each of the files within the folder it succeeds:</p>
  
  <pre><code>copy table_name 
      (column_list)
  from 's3://bucket_name/folder_name/file_prefix'
       credentials 'aws_access_key_id=xxxxxx;aws_secret_access_key=xxxxxxxxx'
       delimiter '|' GZIP
  </code></pre>
  
  <p>The files are GZIP-ed.</p>
  
  <p>It is not explicitly specified in the AWS doc that if you just specify the folder_name it will be ok for the copy command to load the whole contents of that folder, however I do get an error.</p>
  
  <p>Does anyone encountered any similar issues? Is a file-prefix required for this kind of operations?</p>