You can use the saveAsNewAPIHadoop file. You can use it for compressing your output, here's a sample code to use the API.

Thanks
Best Regards

On Thu, Jan 15, 2015 at 5:16 PM, Tom Seddon <mr.tom.seddon@gmail.com> wrote:
Hi,

I've searched but can't seem to find a PySpark example.  How do I write compressed text file output to S3 using PySpark saveAsTextFile?

Thanks,

Tom