Skip to main content

Executes SQL commands from STDIN in a single transaction

Project description

This tool accepts either a Redshift username and password OR an AWS Access Key ID and Secret Key.

If you use the IAM Access/Secret method, the user that you are referencing MUST have the correct policy to get temporary credentials from the database. For example:

  "Version": "2012-10-17",
  "Statement": {
    "Effect": "Allow",
    "Action": "redshift:GetClusterCredentials",
    "Resource": [


python -m redshiftsql host dbname user file --password password --port port


python -m redshiftsql host dbname user file --aws-access-key-id aws-access-key-id --aws-secret-key aws-secret-key --cluster-name cluster-name --port port


  • host The Redshift endpoint, minus the port
  • dbname The Redshift database to connect to
  • user The Redshift user
  • password The Redshift password. Ignored if aws-access-key-id is present
  • port The port on the host. Defaults to 5439
  • region The region that the Redshift cluster is in. Defaults to us-east-1
  • file The file to read the SQL commands from
  • aws-access-key-id The AWS Access Key ID for the IAM user to obtain temporary credentials
  • aws-secret-key The AWS Secret Key for the IAM user to obtain temporary credentials
  • cluster-name The Redshift cluster name to obtain temporary credentials from

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for redshiftsql, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size redshiftsql-0.0.7-py2.py3-none-any.whl (5.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size redshiftsql-0.0.7.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page