How to cancel a running query in Redshift

Run the below query to identify the query that needs to be cancelled and copy the ‘pid’.

select pid, user_name, starttime, query from stv_recents where status='Running';

Cancel the query as below by substituting the pid obtained from the previous step.

cancel pid;

See also  How to make an entire S3 bucket public