Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Querying federated databases

Focus mode
Querying federated databases - AWS Lake Formation

After you grant permissions, users can sign in and start querying the federated database using Amazon Redshift. Users can now use the local database name to reference the Amazon Redshift datashare in SQL queries. In Amazon Redshift, the customer table in the public schema that is shared through the datashare will have a corresponding table created as public.customer in the Data Catalog.

  1. Before querying the federated database using Amazon Redshift, the cluster administrator creates a database from the Data Catalog database using the following command:

    CREATE DATABASE sharedcustomerdb FROM ARN 'arn:aws:glue:<region>:111122223333:database/tahoedb' WITH DATA CATALOG SCHEMA tahoedb
  2. The cluster admin grants usage permissions on the database.

    GRANT USAGE ON DATABASE sharedcustomerdb TO IAM:user;
  3. You ( the federated user) can now log in into SQL tools to query the table.

    Select * from sharedcustomerdb.public.customer limit 10;

For more information, see Querying AWS Glue Data Catalog in Amazon Redshift Management Guide.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.