Creating datashares - 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).

Creating datashares

Creating datashares

As a producer cluster administrator, you can create datashares from the Databases or Datashares tabs in the cluster details page.

  1. Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at https://console.amazonaws.cn/redshift/.

  2. On the navigation menu, choose Clusters, then choose your cluster. The cluster details page appears.

  3. In the cluster details page, do one of the following:

    • From the Databases tab, in the Database section, choose a database. The database details page appears.

      Choose Create datashare. You can only create a datashare from a local database. If you haven't connected to the database, the Connect to database page appears. Follow the steps in Connecting to a database to connect to a database. If there is a recent connection, the Create datashare page appears.

    • From the Datashares tab, in the Datashares section, connect to a database if you don't have a database connection.

      In the Datashares created in my cluster section, choose Create datashare. The Create datashare page appears.

  4. In the Datashare information section, choose one of the following:

    • Choose Datashare to create datashares to share data for read purpose across different Amazon Redshift clusters or in the same Amazon Web Services account or different Amazon Web Services accounts.

    • Choose Amazon Web Services Data Exchange datashare to create datashares to license your data through Amazon Web Services Data Exchange.

  5. Specify values for Datashare name, Database name, and Publicly accessible.

    When you change the database name, make a new database connection.

  6. In the Datashare objects section, choose Add. The add datashare page appears. To add objects to a datashare, follow Adding datashare objects to datashares.

  7. In the Data consumers section, you can choose to publish to a Redshift account, or publish to the Amazon Glue Data Catalog, which starts the process of sharing data via Lake Formation. Publishing your datashare to Redshift accounts means sharing your data with another Redshift account that acts as the consumer cluster.

    Note

    Once the datashare is created, you can't edit the configuration to publish to the other option.

  8. Choose Create datashare.

Amazon Redshift creates the datashare. After the datashare is created, you can create databases from the datashare.

Adding datashare objects to datashares

Add one or more objects to the datashare. Datashare objects are read-only for data consumers.

You can create a datashare without adding datashare objects and add objects later.

A datashare becomes active only when you add at least one object to the datashare.

  1. Choose the datashare you want to add objects to from the datashare list.

  2. Choose Add. The add datashare objects page appears.

  3. Add at least one schema to the datashare before adding other datashare objects. Add multiple schemas by choosing Add and repeat.

  4. You can choose to add all existing objects of chosen object types from the specified schema or add specific individual objects from the specified schema. Choose the Object types, such as tables and views or user-defined functions.

  5. You can choose Add and repeat to add the specified schemas and datashare objects and continue to add another and objects.

Adding data consumers to datashares

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

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

  • Choose Add cluster 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.