Amazon Redshift is a petabyte-scale, enterprise-grade cloud information warehouse service delivering one of the best price-performance. Immediately, tens of hundreds of shoppers run business-critical workloads on Amazon Redshift to cost-effectively and shortly analyze their information utilizing commonplace SQL and present enterprise intelligence (BI) instruments.
Amazon Redshift now makes it simpler so that you can run queries in AWS information lakes by mechanically mounting the AWS Glue Knowledge Catalog. You now not should create an exterior schema in Amazon Redshift to make use of the info lake tables cataloged within the Knowledge Catalog. Now, you should use your AWS Id and Entry Administration (IAM) credentials or IAM function to browse the Glue Knowledge Catalog and question information lake tables straight from Amazon Redshift Question Editor v2 or your most well-liked SQL editors.
This characteristic is now obtainable in all AWS business and US Gov Cloud Areas the place Amazon Redshift RA3, Amazon Redshift Serverless, and AWS Glue can be found. To study extra about auto-mounting of the Knowledge Catalog in Amazon Redshift, discuss with Querying the AWS Glue Knowledge Catalog.
Enabling simple analytics for everybody
Amazon Redshift helps tens of hundreds of shoppers handle analytics at scale. Amazon Redshift presents a strong analytics answer that gives entry to insights for customers of all ability ranges. You’ll be able to make the most of the next advantages:
- It allows organizations to investigate various information sources, together with structured, semi-structured, and unstructured information, facilitating complete information 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 gives options like Multi-AZ (preview) and cross-Area snapshot copy for prime availability and catastrophe restoration, and gives 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 person personas
- The flexibleness to make the most of completely different desk codecs corresponding to Apache Hudi, Delta Lake, and Apache Iceberg (preview) optimizes question efficiency and storage effectivity
- Integration with superior analytical instruments empowers you to use refined methods and construct predictive fashions
- Scalability and elasticity permit for seamless enlargement as information and workloads develop
Total, Amazon Redshift empowers organizations to uncover beneficial insights, improve decision-making, and acquire a aggressive edge in at this time’s data-driven panorama.
Amazon Redshift Prime Advantages
The brand new computerized mounting of the AWS Glue Knowledge Catalog characteristic allows you to straight question AWS Glue objects in Amazon Redshift with out the necessity to create an exterior schema for every AWS Glue database you wish to question. With computerized mounting the Knowledge Catalog, Amazon Redshift mechanically mounts the cluster account’s default Knowledge Catalog throughout boot or person opt-in as an exterior database, named awsdatacatalog.
Related use circumstances for computerized mounting of the AWS Glue Knowledge Catalog characteristic
You should utilize instruments like Amazon EMR to create new information lake schemas in numerous codecs, corresponding to Apache Hudi, Delta Lake, and Apache Iceberg (preview). Nevertheless, when analysts wish to run queries towards 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 Knowledge Catalog.
The next diagram illustrates this structure.

Resolution overview
Now you can use SQL shoppers like Amazon Redshift Question Editor v2 to browse and question awsdatacatalog. In Question Editor V2, to connect with the awsdatacatalog database, select the next:
Full the next high-level steps to combine the automated mounting of the Knowledge Catalog utilizing Question Editor V2 and a third-party SQL consumer:
- Provision assets with AWS CloudFormation to populate Knowledge Catalog objects.
- Join Redshift Serverless and question the Knowledge Catalog as a federated person utilizing Question Editor V2.
- Join with Redshift provisioned cluster and question the Knowledge Catalog utilizing Question Editor V2.
- Configure permissions on catalog assets utilizing AWS Lake Formation.
- Federate with Redshift Serverless and question the Knowledge Catalog utilizing Question Editor V2 and a third-party SQL consumer.
- Uncover the auto-mounted objects.
- Join with Redshift provisioned cluster and question the Knowledge Catalog as a federated person utilizing a third-party consumer.
- Join with Amazon Redshift and question the Knowledge Catalog as an IAM person utilizing third-party shoppers.
The next diagram illustrates the answer workflow.

Conditions
You must have the next conditions:
Provision assets with AWS CloudFormation to populate Knowledge Catalog objects
On this put up, 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/information/NY-Pub/. On this step, we create the answer assets 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
NYTaxiCrawlertogether with the brand new IAM functionAWSGlueServiceRole-RedshiftAutoMount - Creates
automountdbbecause the AWS Glue database

When the stack is full, carry out the next steps:
- On the AWS Glue console, underneath Knowledge Catalog within the navigation pane, select Crawlers.
- Open
NYTaxiCrawlerand select Run crawler.

After the crawler is full, you possibly can see a brand new desk known as ny_pub within the Knowledge Catalog underneath the automountdb database.


Alternatively, you possibly can observe the handbook directions from the Amazon Redshift labs to create the ny_pub desk.
Join with Redshift Serverless and question the Knowledge Catalog as a federated person utilizing Question Editor V2
On this part, we use an IAM function 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 function and add following permissions. For this put up, we add full AWS Glue, Amazon Redshift, and Amazon S3 permissions for demo functions. In an precise manufacturing state of affairs, it’s really helpful to use extra granular permissions.


- On the Tags tab, create a tag with Key as
RedshiftDbRolesand Worth asautomount.
- In Question Editor V2, run the next SQL assertion as an admin person to create a database function named
automount: - Grant utilization privileges to the database function:
- Swap the function to
automountroleby passing the account quantity and function title.
- Within the Question Editor v2, select your Redshift Serverless endpoint (right-click) and select Create connection.
- For Authentication, choose Federated person.
- For Database, enter the database title you wish to hook up with.
- Select Create connection.
You’re now able to discover and question the automated mounting of the Knowledge Catalog in Redshift Serverless.

Join with Redshift provisioned cluster and question the Knowledge Catalog utilizing Question Editor V2
To attach with Redshift provisioned cluster and entry the Knowledge Catalog, be sure to have accomplished the steps within the previous part. Then full the next steps:
- Hook up with Redshift Question Editor V2 utilizing the database person title and password authentication methodology. For instance, hook up with the
devdatabase utilizing the admin person and password. - In an editor tab, assuming the person is current in Amazon Redshift, run the next SQL assertion to grant an IAM person entry to the Knowledge Catalog:
- As an admin person, select the Settings icon, select Account settings, and choose Authenticate with IAM credentials.
- Select Save.

- Swap roles to
automountroleby passing the account quantity and function title. - Create or edit the connection and use the authentication methodology Short-term credentials utilizing your IAM identification.
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 Knowledge 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 assets utilizing AWS Lake Formation
To take care of backward compatibility with AWS Glue, Lake Formation has the next preliminary safety settings:
- The
Tremendouspermission is granted to the groupIAMAllowedPrincipalson all present Knowledge Catalog assets - The Use solely IAM entry management setting is enabled for brand spanking new Knowledge Catalog assets
These settings successfully trigger entry to Knowledge Catalog assets and Amazon S3 places to be managed solely by IAM insurance policies. Particular person Lake Formation permissions should not in impact.
On this step, we’ll configure permissions on catalog assets utilizing AWS Lake Formation. Earlier than you create the Knowledge Catalog, it’s good to replace the default settings of Lake Formation in order that entry to Knowledge Catalog assets (databases and tables) is managed by Lake Formation permissions:
- Change the default safety settings for brand spanking new assets. For directions, see Change the default permission mannequin.
- Change the settings for present Knowledge Catalog assets. For directions, see Upgrading AWS Glue information permissions to the AWS Lake Formation mannequin.
For extra data, discuss with Altering the default settings on your information lake.
Federate with Redshift Serverless and question the Knowledge Catalog utilizing Question Editor V2 and a third-party SQL consumer
With Redshift Serverless, you possibly can hook up with awsdatacatalog from a third-party consumer as a federated person from any identification supplier (IdP). On this part, we’ll configure permission on catalog assets for Federated IAM function in AWS Lake Formation. Utilizing AWS Lake Formation with Redshift, at the moment permission might be utilized on IAM person or IAM function stage.
To attach as a federated person, we will probably be utilizing Redshift Serverless. For setup directions, discuss with Single sign-on with Amazon Redshift Serverless with Okta utilizing Amazon Redshift Question Editor v2 and third-party SQL shoppers.
There are extra modifications required on following assets:
- In Amazon Redshift, as an admin person, grant the utilization to every federated person who wants entry on
awsdatacatalog:
If the person doesn’t exist in Amazon Redshift, you might must create the IAM person 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 function that you just created as a part of the federated setup.
- Beneath Principals, choose IAM customers and roles.
- Select IAM function
oktarole. - Apply catalog useful resource permissions, choosing
automountdbdatabase and granting applicable desk permissions.
- Replace the IAM function used within the federation setup. Along with the permissions added to the IAM function, it’s good to add AWS Glue permissions and Amazon S3 permissions to entry objects from Amazon S3. For this put up, we add full AWS Glue and AWS S3 permissions for demo functions. In an precise manufacturing state of affairs, it’s really helpful to use extra granular permissions.

Now you’re prepared to connect with Redshift Serverless utilizing the Question Editor V2 and federated login.
- Use the SSO URL from Okta and log in to your Okta account together with your person credentials. For this demo, we log in with person
Ethan. - Within the Question Editor v2, select your Redshift Serverless occasion (right-click) and select Create connection.
- For Authentication, choose Federated person.
- For Database, enter the database title you wish to hook up with.
- Select Create connection.
- Run the command
choose current_userto validate that you’re logged in as a federated person.
Person Ethan will have the ability to discover and entry awsdatacatalog information.

To attach Redshift Serverless with a third-party consumer, be sure to have adopted all of the earlier steps.
For SQLWorkbench setup, discuss with the part Configure the SQL consumer (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 exhibits that federated person ethan is ready to question the awsdatacatalog tables utilizing three-part notation:

Join with Redshift provisioned cluster and question the Knowledge Catalog as a federated person utilizing third-party shoppers
With Redshift provisioned cluster, you possibly can join with awsdatacatalog from a third-party consumer as a federated person from any IdP.
To attach as a federated person with the Redshift provisioned cluster, it’s good to observe the steps within the earlier part that detailed how you can join with Redshift Serverless and question the Knowledge Catalog as a federated person utilizing Question Editor V2 and a third-party SQL consumer.
There are extra modifications required in IAM coverage. Replace the IAM coverage with the next code to make use of the GetClusterCredentialsWithIAM API:
Now you’re prepared to connect with Redshift provisioned cluster utilizing a third-party SQL consumer as a federated person.
For SQLWorkbench setup, discuss with the part Configure the SQL consumer (SQL Workbench/J) within the put up Single sign-on with Amazon Redshift Serverless with Okta utilizing Amazon Redshift Question Editor v2 and third-party SQL shoppers.
Make the next modifications:
- Use the newest Redshift JDBC driver as a result of it solely helps querying the auto-mounted Knowledge 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 lets you authenticate with the IAM credentials.

The next screenshot exhibits that federated person ethan is ready to question the awsdatacatalog tables utilizing three-part notation.

Join and question the Knowledge Catalog as an IAM person utilizing third-party shoppers
On this part, we offer directions to arrange a SQL consumer 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’ll be able to carry out numerous eventualities that learn the Knowledge Catalog information and populate Redshift tables.
For this put up, we use SQLWorkbench/J because the SQL consumer to question the Knowledge 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 motive force.
- Select Handle drivers and add all of the recordsdata 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 Knowledge 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 example. You should utilize any AWS profile or IAM credential-based authentication as per your requirement. For extra data on IAM credentials, discuss with Choices for offering IAM credentials.
The next screenshot exhibits that IAM person johndoe is ready to record the awsdatacatalog tables utilizing the SHOW command.

The next screenshot exhibits that IAM person johndoe is ready to question the awsdatacatalog tables utilizing three-part notation:

Should you get the next error whereas utilizing groupfederation=true, it’s good to use the newest Redshift driver:
Clear up
Full the next steps to wash up your assets:
- Delete the IAM function
automountrole. - Delete the CloudFormation stack
CrawlS3Source-NYTaxiDatato wash up the crawlerNYTaxiCrawler, the automountdb database from the Knowledge Catalog, and the IAM functionAWSGlueServiceRole-RedshiftAutoMount.
- Replace the default settings of Lake Formation:
- Within the navigation pane, underneath Knowledge 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
IAMAllowedPrincipalsand choose Create database permission. - Select Grant.

Issues
Observe the next issues:
- The Knowledge Catalog auto-mount gives ease of use to analysts or database customers. The safety setup (establishing the permissions mannequin or information 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 device doesn’t assist looking of a number of databases, you should use the “SHOW“ instructions to record your AWS Glue databases and tables. You may as well question
awsdatacatalogobjects utilizing three-part notation (SELECT * FROM awsdatacatalog.<aws-glue-db-name>.<aws-glue-table-name>;) offered you might have entry to the exterior objects based mostly on the permission mannequin.
Conclusion
On this put up, we launched the automated mounting of AWS Glue Knowledge Catalog, which makes it simpler for purchasers to run queries of their information lakes. This characteristic streamlines information governance and entry management, eliminating the necessity to create an exterior schema in Amazon Redshift to make use of the info lake tables cataloged in AWS Glue Knowledge 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 attempt for enhanced usability in Amazon Redshift, we prioritize unified information governance and fine-grained entry management. This characteristic minimizes handbook effort whereas guaranteeing the mandatory safety measures on your group are in place.
For extra details about computerized mounting of the Knowledge Catalog in Amazon Redshift, discuss with Querying the AWS Glue Knowledge Catalog.
Concerning the Authors
Maneesh Sharma is a Senior Database Engineer at AWS with greater than a decade of expertise designing and implementing large-scale information warehouse and analytics options. He collaborates with numerous 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, utility 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 based mostly in Dallas, Texas. He has 17 years of expertise architecting, constructing, main, and sustaining large information platforms. Rohit helps prospects modernize their analytic workloads utilizing the breadth of AWS providers and ensures that prospects get one of the best value/efficiency with utmost safety and information governance.
