Adding data consumers to a datashare in Amazon Redshift - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Adding data consumers to a datashare in Amazon Redshift

You can add one or more data consumers to the datashares on the console or with SQL. Data consumers can be namespaces that uniquely identified Amazon Redshift clusters or Amazon Web Services accounts.

Console

You must explicitly choose to turn off or turn on sharing your datashare to clusters with public access.

  • Choose Add namespaces to the datashare. Namespaces are globally unique identifier (GUID) for Amazon Redshift cluster.

  • Choose Add Amazon Web Services accounts to the datashare. The specified Amazon Web Services accounts must have access permissions to the datashare.

SQL

With SQL, the administrator grants usage on the datashare to a specific namespace in the account. You can find the namespace ID as part of the ARN in the cluster details page, in the Amazon Redshift Serverless namespace details page, or by running the command SELECT current_namespace;. For more information, see CURRENT_NAMESPACE.

GRANT USAGE ON DATASHARE my_datashare TO NAMESPACE '86b5169f-012a-234b-9fbb-e2e24359e9a8';

The following is an example of how to grant usage of a datashare to an Amazon Web Services account.

GRANT USAGE ON DATASHARE salesshare TO ACCOUNT '123456789012';

The following is an example of how to grant usage of a datashare to a Lake Formation account.

GRANT USAGE ON DATASHARE salesshare TO ACCOUNT '123456789012' VIA DATA CATALOG;