title: A way to export psql table (or query) directly to AWS S3 as file (csv, json)
body: <p><a href="https://stackoverflow.com/questions/39899210/exporting-a-aws-postgres-rds-table-to-aws-s3">This answer</a> suggests using <strong>AWS Data Pipeline</strong> but I'm wondering if there's a clever way to do it with my own machine and Python. </p>
  
  <p>I've been using <strong>psycopg2</strong>, <strong>boto3</strong> and <strong>pandas</strong> libraries. Tables have 5 to 50 columns and few million rows. My current method doesn't work that well with large data.</p>