# Cross-account sharing

## Prerequisite

* Create a **Service**, **Stream**, or **Feed** for export (such as the **orders** stream).

![Export Cloud Account](/assets/images/export-cloud-acct-160c8609b9b07d205a256d1f831e984a.png)

Cross-Account Sharing allows you to share **Services**, **Streams**, and **Feeds** across accounts. Since accounts are isolated, this feature presents an opportunity for data sharing. You share data across accounts by exporting data from one account and importing this data into another.

## Exports/imports

note

**E-commerce App**

In our example E-commerce app, we created the **orders** stream using the **Cloud_Acct**. These messages must reach the East Coast warehouse, which is a separate account. From the **Cloud_Acct**, we’ll access the **orders** stream for export to the **Warehouse_Acct**.

The instructions below apply, if you need to export data. You are neither required to follow the E-commerce scenario nor include its parameters. Simply follow the instructions to export your **Service**, **Stream**, or **Feed** into your preferred account. However, to guide you through our cloud/warehouse scenario, we have provided the parameters for the E-commerce app such that you fully understand how this process works. Our intent is to move data from one account to another.

warning

**WARNING**: To ensure you don’t trigger the **account contains more exports than allowed by the operator** message, access **Settings** (for point of origin account that contains your stream) and set the value in the **Exports** field to **2**.

To export account data:

**Export parameters for E-commerce app** (for **orders** stream):

| Field                      | Parameter         |
| -------------------------- | ----------------- |
| Available stream to export | orders            |
| Visibility                 | Private (default) |
| Account                    | Warehouse         |

1. Click **Streams**.

2. Click **Export Stream**.

3. Designate your **Export Stream** parameters.

   With a multi-tenant cluster, keep **Visibility**: **Private**.

   ![Export Stream Orders](/assets/images/export-stream-orders-264650d489e1655dfe9f72c8578cef23.png)

4. **Save** your updates.

   **Share Stream** opens.

   ![Share Stream](/assets/images/share-stream-61bcbb03eed8f9173dc6fe62d67c76e7.png)

5. Choose **Warehouse** from the dropdown list box (or your destination account), then click **Add Account**.

   This creates a share request.

   ![Add Account Now Disabled](/assets/images/add-acct-disabled-a07e5042fe968316715c935eb6597d71.png)

   You remain within the **Cloud_Account** (or account where you created your stream).

   ![Cloud Account Share Stream](/assets/images/cloud-acct-share-stream-d66ab92c000f450db255f7d93a7d9da0.png)

6. Click the new link that appears, **Warehouse**, for example.

   You’re launched to the **Warehouse_Acct** (or your destination account where you’ll share data) and can view **Stream Imports** within the **Sharing** tab. You have exported from the **Cloud_Acct** and now reside in **Stream Imports** of the account where you’re sharing data, **Warehouse_Acct**.

7. Click **Create Import**.

   You can now view, **Import Available Stream**.

   ![Import Available Stream](/assets/images/import-available-stream-791913f59b42b5befa7a47552fad46ae.png)

8. Click **Import Available Stream**.

   A table displays all publicly available and privately shared/available streams.

   ![Import and Mirror](/assets/images/import-and-mirror-704ff6b09667f1ec1ca7c13f1c3323bb.png)

9. Click **Import and Mirror**, moving orders into the **Warehouse_Acct** (or destination account).

   **Create Mirror** opens.

   **Mirror parameters for E-commerce app**:

   | Field           | Parameter                                                                                  |
   | --------------- | ------------------------------------------------------------------------------------------ |
   | Name            | orders_mirror                                                                              |
   | Description     | Mirror of orders                                                                           |
   | Replicas        | R3 is preferred; however, R1 is the only option available with the **Personal/Free** tier. |
   | Cluster Enabled | ngsprod-aws-useast2                                                                        |

   ![Create Mirror](/assets/images/create-mirror-f13ea2fb5d21c6ed58c4b479ca66e35f.png)

10. Designate your mirror parameters.

11. **Save** your updates.

    The table displays the mirror you created.

    ![Mirror Created](/assets/images/mirror-created-84e643671e2bfd237b1481143246a17b.png)

    You can click this mirror – **orders_mirror**, for example – to view **Mirror Activity**. You have successfully shared data across accounts.
