本节我们将在两个帐号的redshift集群之间创建datashare
在account 1的customer-redshift-cluster下,点击datashares:

跟之前的datashare一样,第一步是先连接到数据库:

使用awsuser连接:

连接成功后点击crate datashare:

命名为customer_sales_datashare, 开启publicly accessible:

添加Datashare objects,选择public schema和Tables and views,选择分享所有objects:

点击add之后,customer表被显示出来:

在Data consumers部分,输入account 2的id,然后点击创建:

跟前面同帐号进行datashare不同的是,account 1在创建完datashare之后还要授权下。点击左侧的Datashares:

刚才创建的datashare会显示成Action required状态:

点击进去之后,进行Authorize:

完成之后状态如下:

登录到account 2,在redshift的Datashares下面,能看到From other account的分享:

点击Associate,将它与本帐号的Redshift集群进行关联:

将其关联到特定region和集群:

选择us-east-1下的sales-redshift-cluster集群:

Datashare objects部分要先连接到集群:


Assoicate步骤完成后,我们就可以用这个datashare创建数据库到sales-redshift-cluster集群了:

将数据库命名为customer_data_share:

这样将一个customer_data_share到sales-redshift-cluster内部。