Creating datashares and adding objects (preview) - 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 and adding objects (preview)

Creating datashares

This is prerelease documentation for the multi-data warehouse writes through data sharing feature for Amazon Redshift, which is available in public preview in the PREVIEW_2023 track. The documentation and the feature are both subject to change. We recommend that you use this feature only with test clusters, and not in production environments. For preview terms and conditions, see Beta Service Participation in Amazon Service Terms.

For more information about getting started with data sharing, go to Sharing both read and write data within an Amazon account or across accounts.

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 (preview) 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. From here, you can add database objects of various types. Select the Add button to add objects. A dialog appears. Perform the following steps:

    1. Choose a schema, or more than one schema. Doing this makes objects from the schemas available to add.

    2. Select Objects types from the schemas.

      From here you can choose a couple options to Add objects:

      • Add specific objects from schemas – If you choose this, it lists individual objects by name. You can select objects and add them to the datashare. For example, you can add specific Tables and Stored procedures, if you like. Then the tables and stored procedures from the schema you selected are included in the datashare. Setting permissions is explained further in subsequent steps. Continue with Views and other types, selecting objects to add.

      • Add all existing objects from the selected object types to the schema – This adds all of the objects.

    3. You can also choose whether you want to Add future objects. When you choose to include datashare objects added to the schema, it means that objects added to the schema are added to the datashare automatically.

    4. Choose Add to complete the section and add the objects. They're listed under the Datashare objects.

    5. After you add objects, you can select individual objects and edit their permissions. If you select a schema, a dialog appears that asks if you would like to add Scoped permissions. This makes it so each existing or added object to the schema has a pre-selected set of permissions, appropriate for the object type. For instance, the administrator can set that all added tables have SELECT and UPDATE permissions, for instance.

    6. After you configure schema permissions you can walk through additional object types and select their permissions. For instance, you can add UPDATE permissions to a specific table.

    7. In the Data consumers section, you can add namespaces or add Amazon accounts as consumers of the datashare.

    8. Choose Create datashare to save your changes.

    After you create the datashare, it appears in the list under Datashares created in my namespace. If you choose a datashare from the list, you can view its consumers, its objects, and other properties.

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.