Why can't I connect to the Amazon Redshift query editor?

Last updated: 2020-07-10

I'm trying to connect to the Amazon Redshift query editor, but I'm getting a 502 Bad Gateway Error or 504 Timeout Error. How do I resolve these errors?

Resolution

I can't find my Amazon Redshift cluster to connect to the query editor

The query editor only supports the following nodes types:

DC1.8xlarge, DC2.large, DC2.8xlarge, DS2.8xlarge, RA3.4xlarge, RA3.16xlarge

Note: Currently, the query editor does not support enhanced VPC routing.

If you would like to use any other node type, or have enhanced VPC routing configured for your Amazon Redshift cluster, connect to your Amazon Redshift cluster using an SQL client such as SQL Workbench/J.

I'm getting a "User not authorized" or "Access denied" error while connecting to the query editor with Amazon Redshift

You must have proper permissions to access the query editor. To enable access, attach the "AmazonRedshiftQueryEditor" and "AmazonRedshiftReadOnlyAccess" policies for AWS Identity and Access Management (IAM) to the IAM user that you use to access your Amazon Redshift cluster. "AmazonRedshiftQueryEditor" is an AWS managed policy that allows the redshift:GetClusterCredentials action. By default, this action provides a superuser access to the database. For more information about how to do this in the console, see Enabling access to the query editor.

I get a 502 Bad Gateway or 504 Gateway Timeout Error error while connecting to the query editor

A Bad Gateway Error and Gateway Timeout Error are both caused by transient network issues. Issues between online servers can cause a Bad Gateway Error. A Gateway Timeout Error can occur if your Amazon Redshift cluster fails to receive a timely response from an upstream server. A timeout error can also occur if the cluster CPU usage reaches 100% for a long duration, or if too many queries are being run.

To resolve these errors, try the following troubleshooting tips:

  • Clear your cache and browser cookies.
  • Switch to a different browser to connect to query editor.
  • Use a different network to connect.
  • Reboot your Amazon Redshift cluster to restart the query editor.
  • Monitor the workload on your Amazon Redshift cluster to be sure that there aren't any long-running queries that are increasing your CPU usage. You can verify this by looking at the CPUUtilization metric in your Amazon CloudWatch dashboard.
  • Increase the number of compute nodes on your cluster to help manage the increased workload. For more information, see Clusters and nodes in Amazon Redshift.

Then, re-try connecting to the query editor in your Amazon Redshift cluster.

My query gets aborted by the query editor

When using the query editor, note that it is only suitable for short-running queries that can be completed within ten minutes. For queries that run longer than ten minutes, use a third-party SQL client like SQL Workbench/J. For more information about using query editor, see Query editor considerations.


Did this article help?


Do you need billing or technical support?