Josh Rosen
Josh Rosen

Reputation: 13841

Determining a Redshift cluster's AWS region over JDBC

Given a JDBC connection to a Amazon Redshift cluster, is there a query that I can execute to determine which AWS region the Redshift cluster is running in?

Upvotes: 1

Views: 1140

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269550

The Amazon Redshift cluster wouldn't know its own region (that's defined 'outside' of the cluster), but the URL of the cluster would give you an answer, eg:

jdbc:postgresql://db.cb4ysqlysqlz.us-west-2.redshift.amazonaws.com:5439/db

That URL is pointing to a cluster in the us-west-2 region.

Upvotes: 2

Related Questions