Amazon Redshift is a petabyte-scale, enterprise-grade cloud knowledge warehouse service delivering the most effective price-performance. In the present day, tens of hundreds of shoppers run business-critical workloads on Amazon Redshift to cost-effectively and rapidly analyze their knowledge utilizing normal SQL and present enterprise intelligence (BI) instruments.
Amazon Redshift now makes it simpler so that you can run queries in AWS knowledge lakes by routinely mounting the AWS Glue Information Catalog. You not should create an exterior schema in Amazon Redshift to make use of the information lake tables cataloged within the Information Catalog. Now, you need to use your AWS Id and Entry Administration (IAM) credentials or IAM position to browse the Glue Information Catalog and question knowledge lake tables instantly from Amazon Redshift Question Editor v2 or your most well-liked SQL editors.
This function is now out there in all AWS industrial and US Gov Cloud Areas the place Amazon Redshift RA3, Amazon Redshift Serverless, and AWS Glue can be found. To be taught extra about auto-mounting of the Information Catalog in Amazon Redshift, check with Querying the AWS Glue Information Catalog.
Enabling straightforward analytics for everybody
Amazon Redshift helps tens of hundreds of shoppers handle analytics at scale. Amazon Redshift gives a strong analytics resolution that gives entry to insights for customers of all talent ranges. You may make the most of the next advantages:
- It allows organizations to research various knowledge sources, together with structured, semi-structured, and unstructured knowledge, facilitating complete knowledge exploration
- With its high-performance processing capabilities, Amazon Redshift handles massive and complicated datasets, guaranteeing quick question response occasions and supporting real-time analytics
- Amazon Redshift supplies options like Multi-AZ (preview) and cross-Area snapshot copy for prime availability and catastrophe restoration, and supplies authentication and authorization mechanisms to make it dependable and safe
- With options like Amazon Redshift ML, it democratizes ML capabilities throughout a wide range of consumer personas
- The flexibleness to make the most of completely different desk codecs resembling Apache Hudi, Delta Lake, and Apache Iceberg (preview) optimizes question efficiency and storage effectivity
- Integration with superior analytical instruments empowers you to use subtle strategies and construct predictive fashions
- Scalability and elasticity permit for seamless growth as knowledge and workloads develop
Total, Amazon Redshift empowers organizations to uncover priceless insights, improve decision-making, and achieve a aggressive edge in at the moment’s data-driven panorama.

Amazon Redshift High Advantages
The brand new computerized mounting of the AWS Glue Information Catalog function allows you to instantly question AWS Glue objects in Amazon Redshift with out the necessity to create an exterior schema for every AWS Glue database you need to question. With computerized mounting the Information Catalog, Amazon Redshift routinely mounts the cluster account’s default Information Catalog throughout boot or consumer opt-in as an exterior database, named awsdatacatalog
.
Related use instances for computerized mounting of the AWS Glue Information Catalog function
You need to use instruments like Amazon EMR to create new knowledge lake schemas in varied codecs, resembling Apache Hudi, Delta Lake, and Apache Iceberg (preview). Nonetheless, when analysts need to run queries in opposition to these schemas, it requires directors to create exterior schemas for every AWS Glue database in Amazon Redshift. Now you can simplify this integration utilizing computerized mounting of the AWS Glue Information Catalog.
The next diagram illustrates this structure.
Answer overview
Now you can use SQL shoppers like Amazon Redshift Question Editor v2 to browse and question awsdatacatalog
. In Question Editor V2, to hook up with the awsdatacatalog
database, select the next:
Full the next high-level steps to combine the automated mounting of the Information Catalog utilizing Question Editor V2 and a third-party SQL shopper:
- Provision sources with AWS CloudFormation to populate Information Catalog objects.
- Join Redshift Serverless and question the Information Catalog as a federated consumer utilizing Question Editor V2.
- Join with Redshift provisioned cluster and question the Information Catalog utilizing Question Editor V2.
- Configure permissions on catalog sources utilizing AWS Lake Formation.
- Federate with Redshift Serverless and question the Information Catalog utilizing Question Editor V2 and a third-party SQL shopper.
- Uncover the auto-mounted objects.
- Join with Redshift provisioned cluster and question the Information Catalog as a federated consumer utilizing a third-party shopper.
- Join with Amazon Redshift and question the Information Catalog as an IAM consumer utilizing third-party shoppers.
The next diagram illustrates the answer workflow.
Stipulations
You need to have the next stipulations:
Provision sources with AWS CloudFormation to populate Information Catalog objects
On this publish, we use an AWS Glue crawler to create the exterior desk ny_pub
saved in Apache Parquet format within the Amazon Easy Storage Service (Amazon S3) location s3://redshift-demos/knowledge/NY-Pub/
. On this step, we create the answer sources utilizing AWS CloudFormation to create a stack named CrawlS3Source-NYTaxiData
in both us-east-1
(use the yml obtain or launch stack) or us-west-2
(use the yml obtain or launch stack). Stack creation performs the next actions:
- Creates the crawler
NYTaxiCrawler
together with the brand new IAM positionAWSGlueServiceRole-RedshiftAutoMount
- Creates
automountdb
because the AWS Glue database
When the stack is full, carry out the next steps:
- On the AWS Glue console, underneath Information Catalog within the navigation pane, select Crawlers.
- Open
NYTaxiCrawler
and select Run crawler.
After the crawler is full, you’ll be able to see a brand new desk referred to as ny_pub
within the Information Catalog underneath the automountdb
database.
Alternatively, you’ll be able to comply with the handbook directions from the Amazon Redshift labs to create the ny_pub
desk.
Join with Redshift Serverless and question the Information Catalog as a federated consumer utilizing Question Editor V2
On this part, we use an IAM position with principal tags to allow fine-grained federated authentication to Redshift Serverless to entry auto-mounting AWS Glue objects.
Full the next steps:
- Create an IAM position and add following permissions. For this publish, we add full AWS Glue, Amazon Redshift, and Amazon S3 permissions for demo functions. In an precise manufacturing situation, it’s advisable to use extra granular permissions.
- On the Tags tab, create a tag with Key as
RedshiftDbRoles
and Worth asautomount
. - In Question Editor V2, run the next SQL assertion as an admin consumer to create a database position named
automount
: - Grant utilization privileges to the database position:
- Swap the position to
automountrole
by passing the account quantity and position title. - Within the Question Editor v2, select your Redshift Serverless endpoint (right-click) and select Create connection.
- For Authentication, choose Federated consumer.
- For Database, enter the database title you need to hook up with.
- Select Create connection.
You’re now able to discover and question the automated mounting of the Information Catalog in Redshift Serverless.
Join with Redshift provisioned cluster and question the Information Catalog utilizing Question Editor V2
To attach with Redshift provisioned cluster and entry the Information Catalog, be sure you have accomplished the steps within the previous part. Then full the next steps:
- Hook up with Redshift Question Editor V2 utilizing the database consumer title and password authentication methodology. For instance, hook up with the
dev
database utilizing the admin consumer and password. - In an editor tab, assuming the consumer is current in Amazon Redshift, run the next SQL assertion to grant an IAM consumer entry to the Information Catalog:
- As an admin consumer, select the Settings icon, select Account settings, and choose Authenticate with IAM credentials.
- Select Save.
- Swap roles to
automountrole
by passing the account quantity and position title. - Create or edit the connection and use the authentication methodology Non permanent credentials utilizing your IAM id.
For extra details about this authentication methodology, see Connecting to an Amazon Redshift database.
You might be able to discover and question the automated mounting of the Information Catalog in Amazon Redshift.
Uncover the auto-mounted objects
This part illustrates the SHOW instructions for discovery of auto-mounted objects. See the next code:
Configure permissions on catalog sources utilizing AWS Lake Formation
To keep up backward compatibility with AWS Glue, Lake Formation has the next preliminary safety settings:
- The
Tremendous
permission is granted to the groupIAMAllowedPrincipals
on all present Information Catalog sources - The Use solely IAM entry management setting is enabled for brand new Information Catalog sources
These settings successfully trigger entry to Information Catalog sources and Amazon S3 areas to be managed solely by IAM insurance policies. Particular person Lake Formation permissions usually are not in impact.
On this step, we’ll configure permissions on catalog sources utilizing AWS Lake Formation. Earlier than you create the Information Catalog, you might want to replace the default settings of Lake Formation in order that entry to Information Catalog sources (databases and tables) is managed by Lake Formation permissions:
- Change the default safety settings for brand new sources. For directions, see Change the default permission mannequin.
- Change the settings for present Information Catalog sources. For directions, see Upgrading AWS Glue knowledge permissions to the AWS Lake Formation mannequin.
For extra data, check with Altering the default settings on your knowledge lake.
Federate with Redshift Serverless and question the Information Catalog utilizing Question Editor V2 and a third-party SQL shopper
With Redshift Serverless, you’ll be able to hook up with awsdatacatalog
from a third-party shopper as a federated consumer from any id supplier (IdP). On this part, we’ll configure permission on catalog sources for Federated IAM position in AWS Lake Formation. Utilizing AWS Lake Formation with Redshift, presently permission might be utilized on IAM consumer or IAM position stage.
To attach as a federated consumer, we might be utilizing Redshift Serverless. For setup directions, check with Single sign-on with Amazon Redshift Serverless with Okta utilizing Amazon Redshift Question Editor v2 and third-party SQL shoppers.
There are further adjustments required on following sources:
- In Amazon Redshift, as an admin consumer, grant the utilization to every federated consumer who wants entry on
awsdatacatalog
:
If the consumer doesn’t exist in Amazon Redshift, chances are you’ll have to create the IAM consumer with the password disabled as proven within the following code after which grant utilization on awsdatacatalog
:
- On the Lake Formation console, assign permissions on the AWS Glue database to the IAM position that you simply created as a part of the federated setup.
- Underneath Principals, choose IAM customers and roles.
- Select IAM position
oktarole
. - Apply catalog useful resource permissions, deciding on
automountdb
database and granting acceptable desk permissions.
- Replace the IAM position used within the federation setup. Along with the permissions added to the IAM position, you might want to add AWS Glue permissions and Amazon S3 permissions to entry objects from Amazon S3. For this publish, we add full AWS Glue and AWS S3 permissions for demo functions. In an precise manufacturing situation, it’s advisable to use extra granular permissions.
Now you’re prepared to hook up with Redshift Serverless utilizing the Question Editor V2 and federated login.
- Use the SSO URL from Okta and log in to your Okta account along with your consumer credentials. For this demo, we log in with consumer
Ethan
. - Within the Question Editor v2, select your Redshift Serverless occasion (right-click) and select Create connection.
- For Authentication, choose Federated consumer.
- For Database, enter the database title you need to hook up with.
- Select Create connection.
- Run the command
choose current_user
to validate that you’re logged in as a federated consumer.
Person Ethan
will be capable of discover and entry awsdatacatalog
knowledge.
To attach Redshift Serverless with a third-party shopper, be sure you have adopted all of the earlier steps.
For SQLWorkbench setup, check with the part Configure the SQL shopper (SQL Workbench/J) in Single sign-on with Amazon Redshift Serverless with Okta utilizing Amazon Redshift Question Editor v2 and third-party SQL shoppers.
The next screenshot reveals that federated consumer ethan
is ready to question the awsdatacatalog
tables utilizing three-part notation:
Join with Redshift provisioned cluster and question the Information Catalog as a federated consumer utilizing third-party shoppers
With Redshift provisioned cluster, you’ll be able to join with awsdatacatalog
from a third-party shopper as a federated consumer from any IdP.
To attach as a federated consumer with the Redshift provisioned cluster, you might want to comply with the steps within the earlier part that detailed the way to join with Redshift Serverless and question the Information Catalog as a federated consumer utilizing Question Editor V2 and a third-party SQL shopper.
There are further adjustments required in IAM coverage. Replace the IAM coverage with the next code to make use of the GetClusterCredentialsWithIAM
API:
Now you’re prepared to hook up with Redshift provisioned cluster utilizing a third-party SQL shopper as a federated consumer.
For SQLWorkbench setup, check with the part Configure the SQL shopper (SQL Workbench/J) within the publish Single sign-on with Amazon Redshift Serverless with Okta utilizing Amazon Redshift Question Editor v2 and third-party SQL shoppers.
Make the next adjustments:
- Use the newest Redshift JDBC driver as a result of it solely helps querying the auto-mounted Information Catalog desk for federated customers
- For URL, enter
jdbc:redshift:iam://<cluster endpoint>:<port>:<databasename>?groupfederation=true
. For instance,jdbc:redshift:iam://redshift-cluster-1.abdef0abc0ab.us-east-2.redshift.amazonaws.com:5439/dev?groupfederation=true
.
Within the previous URL, groupfederation
is a compulsory parameter that means that you can authenticate with the IAM credentials.
The next screenshot reveals that federated consumer ethan
is ready to question the awsdatacatalog
tables utilizing three-part notation.
Join and question the Information Catalog as an IAM consumer utilizing third-party shoppers
On this part, we offer directions to arrange a SQL shopper to question the auto-mounted awsdatacatalog
.
Use three-part notation to reference the awsdatacatalog desk in your SELECT assertion. The primary half is the database title, the second half is the AWS Glue database title, and the third half is the AWS Glue desk title:
You may carry out varied situations that learn the Information Catalog knowledge and populate Redshift tables.
For this publish, we use SQLWorkbench/J because the SQL shopper to question the Information Catalog. To arrange SQL Workbench/J, full the next steps:
- Create a brand new connection in SQL Workbench/J and select Amazon Redshift as the driving force.
- Select Handle drivers and add all of the information from the downloaded AWS JDBC driver pack .zip file (keep in mind to unzip the .zip file).
It’s essential to use the newest Redshift JDBC driver as a result of it solely helps querying the auto-mounted Information Catalog desk.
- For URL, enter
jdbc:redshift:iam://<cluster endpoint>:<port>:<databasename>?profile=<profilename>&groupfederation=true
. For instance,jdbc:redshift:iam://redshift-cluster-1.abdef0abc0ab.us-east-2.redshift.amazonaws.com:5439/dev?profile=user2&groupfederation=true
.
We’re utilizing profile-based credentials for instance. You need to use any AWS profile or IAM credential-based authentication as per your requirement. For extra data on IAM credentials, check with Choices for offering IAM credentials.
The next screenshot reveals that IAM consumer johndoe
is ready to listing the awsdatacatalog
tables utilizing the SHOW command.
The next screenshot reveals that IAM consumer johndoe
is ready to question the awsdatacatalog
tables utilizing three-part notation:
For those who get the next error whereas utilizing groupfederation=true
, you might want to use the newest Redshift driver:
Clear up
Full the next steps to scrub up your sources:
- Delete the IAM position
automountrole
. - Delete the CloudFormation stack
CrawlS3Source-NYTaxiData
to scrub up the crawlerNYTaxiCrawler
, the automountdb database from the Information Catalog, and the IAM positionAWSGlueServiceRole-RedshiftAutoMount
. - Replace the default settings of Lake Formation:
- Within the navigation pane, underneath Information catalog, select Settings.
- Choose each entry management choices select Save.
- Within the navigation pane, underneath Permissions, select Administrative roles and duties.
- Within the Database creators part, select Grant.
- Seek for
IAMAllowedPrincipals
and choose Create database permission. - Select Grant.
Issues
Notice the next issues:
- The Information Catalog auto-mount supplies ease of use to analysts or database customers. The safety setup (establishing the permissions mannequin or knowledge governance) is owned by account and database directors.
- To attain fine-grained entry management, construct a permissions mannequin in AWS Lake Formation.
- If the permissions should be maintained on the Redshift database stage, go away the AWS Lake Formation default settings as is after which run grant/revoke in Amazon Redshift.
- If you’re utilizing a third-party SQL editor, and your question software doesn’t assist shopping of a number of databases, you need to use the “SHOW“ instructions to listing your AWS Glue databases and tables. You can even question
awsdatacatalog
objects utilizing three-part notation (SELECT * FROM awsdatacatalog.<aws-glue-db-name>.<aws-glue-table-name>;
) offered you will have entry to the exterior objects primarily based on the permission mannequin.
Conclusion
On this publish, we launched the automated mounting of AWS Glue Information Catalog, which makes it simpler for patrons to run queries of their knowledge lakes. This function streamlines knowledge governance and entry management, eliminating the necessity to create an exterior schema in Amazon Redshift to make use of the information lake tables cataloged in AWS Glue Information Catalog. We confirmed how one can handle permission on auto-mounted AWS Glue-based objects utilizing Lake Formation. The permission mannequin might be simply managed and arranged by directors, permitting database customers to seamlessly entry exterior objects they’ve been granted entry to.
As we try for enhanced usability in Amazon Redshift, we prioritize unified knowledge governance and fine-grained entry management. This function minimizes handbook effort whereas guaranteeing the mandatory safety measures on your group are in place.
For extra details about computerized mounting of the Information Catalog in Amazon Redshift, check with Querying the AWS Glue Information Catalog.
In regards to the Authors
Maneesh Sharma is a Senior Database Engineer at AWS with greater than a decade of expertise designing and implementing large-scale knowledge warehouse and analytics options. He collaborates with varied Amazon Redshift Companions and prospects to drive higher integration.
Debu Panda is a Senior Supervisor, Product Administration at AWS. He’s an business chief in analytics, software platform, and database applied sciences, and has greater than 25 years of expertise within the IT world.
Rohit Vashishtha is a Senior Analytics Specialist Options Architect at AWS primarily based in Dallas, Texas. He has 17 years of expertise architecting, constructing, main, and sustaining massive knowledge platforms. Rohit helps prospects modernize their analytic workloads utilizing the breadth of AWS companies and ensures that prospects get the most effective worth/efficiency with utmost safety and knowledge governance.