Cross-account data sharing
Time: 1 hour
Prerequisites: This tutorial spans three AWS accounts, ideally in the same organization in AWS Organizations, connected through a single IAM Identity Center–based SageMaker Unified Studio domain (corporate-domain):
Governance (111111111111) – domain admin; hosts the root domain, the SageMaker Catalog, and account associations.
Producer (222222222222) – data engineering team; hosts a retail_sales_performance table in the SageMaker Lakehouse.
Consumer (333333333333) – data analytics team; runs analytics tools (Query Editor) that need the data.
Three people federate through IAM Identity Center and map to roles: a SageMaker Domain Administrator, a Data Engineer (producer), and a Data Analyst (consumer). Each has signed in at least once, and the SageMaker Domain Administrator is a root domain owner.
Outcome: The producer team publishes a retail sales table to the shared catalog. The consumer team in a different account discovers it, subscribes through a governed request, and queries it in place, with no data copied or moved.
What you will do
An organization's data often lives in separate accounts. The usual workaround copies data on a schedule, which produces stale duplicates and leaves no audit trail. With the business catalog, you can build a data mesh across accounts without moving or copying data.
In this tutorial, you will:
Associate the producer and consumer accounts with the governance domain
Provision each team's tools with project profiles
Create a producer project and set up a governance framework (metadata form and business glossary)
Bring data into the lakehouse and publish it as a curated, classified asset
Create a consumer project
Discover, subscribe to, and query the asset from the consumer account
Step 1: Associate the producer and consumer accounts
Association is a two-way handshake: The governance account requests, and the target account accepts. This handshake extends the domain's governance into an existing account without migrating anything. For the full account association procedure, see Associated accounts in the Administrator Guide.
From the governance account, open the Amazon SageMaker console, open your Identity Center–based domain, select the Account associations tab, and choose Request association.
Choose External RAM share, select the managed permission that lets IAM users and roles access APIs and sign in to SageMaker Unified Studio, enter the producer account ID (222222222222), and choose Request association.
In the producer account, open the SageMaker console, choose View requests, select the domain, and choose Accept association.
On the Enable Tooling page, add a VPC and two subnets, leave the rest as default, and choose Enable blueprint.
Repeat the handshake for the consumer account (333333333333). The Account associations tab then lists all three accounts.
Associating an account automatically creates an admin project named admin-project-<accountID> in the domain account, which you can use to verify the association succeeded.
Association is the boundary-crossing primitive of the mesh. It creates the trust and provisioning path that later lets a project in one account read a table published from another, all managed centrally from the governance account.
Step 2: Provision team tools with project profiles
A project profile is a template that binds capabilities (from a blueprint) to a specific account and Region and authorizes specific roles.
In the governance account, on the Project profiles tab, choose Create.
Create a profile named All Capabilities - Data Engineering from the All capabilities template, target the producer account and its Region, and authorize the SageMaker Domain Admin and Data Engineer roles.
From the producer account, enable all capabilities.
Repeat to create All Capabilities - Data Analysts targeting the consumer account and authorizing the Data Analyst role, then enable all capabilities from the consumer account.
Project profiles standardize what a team gets without hand-building infrastructure each time. The profile decides which account a project's resources are created in, which capabilities are available, and who is allowed to use them. Producers and consumers can then share one template while landing resources in different accounts.
Step 3: Create the producer project
Sign in as the Data Engineer and open SageMaker Unified Studio.
Choose Create project.
Name it Data engineering and curation and select the All Capabilities - Data Engineering profile. This provisions resources in the producer account.
Specify a lakehouse database name such as data_engineering_curation.
Review and choose Create project.
Before the Data Engineer can create the project and its governance constructs, an administrator must add the Data Engineer and Data Analyst roles to the domain unit's project creation policy, and designate Owner for all projects in the glossary creation policy and the metadata form creation policy.
Step 4: Set up a governance framework
You invest once in reusable governance constructs so that metadata stays consistent and searchable across the mesh.
First, create the metadata form:
In the Data engineering and curation project, create a metadata form named Data Ownership (technical name dataOwnership).
Add a required Data Owner Name string field (technical name dataOwnerName) and an optional Data Steward Name string field (technical name dataStewardName).
Enable the form.
Next, create the business glossary:
In the Data engineering and curation project, create a business glossary named Data Classification.
Add the following terms:
Confidential
Proprietary – internal data not intended for public access
Public – data available outside the organization and intended for public consumption
Restricted – information that requires the highest level of protection; unauthorized disclosure could have serious financial, legal, or reputational repercussions
Enable the glossary.
When the analyst later finds the table, they immediately see its classification, owner, and steward before requesting access.
Step 5: Bring data into the lakehouse
In the Data engineering and curation project, choose Query Editor, and then expand the data_engineering_curation database.
Enter and run the following CREATE TABLE statement to create a table populated with sample retail sales data.
CREATE TABLE "AwsDataCatalog"."data_engineering_curation"."retail_sales_performance" WITH ( format = 'PARQUET', parquet_compression = 'SNAPPY' ) AS SELECT "date", "store_id", "product_id", "sales_amount", "units_sold" FROM ( VALUES ('2024-01-01', 'STORE_001', 'PROD_101', 1500.00, 30), ('2024-01-01', 'STORE_002', 'PROD_102', 2300.50, 45), ('2024-01-02', 'STORE_001', 'PROD_103', 870.75, 18), ('2024-01-02', 'STORE_003', 'PROD_101', 3200.00, 64), ('2024-01-03', 'STORE_002', 'PROD_104', 1100.25, 22), ('2024-01-03', 'STORE_004', 'PROD_102', 4500.00, 90), ('2024-01-04', 'STORE_001', 'PROD_105', 675.50, 13), ('2024-01-04', 'STORE_003', 'PROD_103', 2900.00, 58), ('2024-01-05', 'STORE_002', 'PROD_101', 1800.00, 36), ('2024-01-05', 'STORE_004', 'PROD_104', 3350.75, 67) ) AS t("date", "store_id", "product_id", "sales_amount", "units_sold");
Preview the table or run a SELECT query to confirm that the data loaded.
Step 6: Curate and publish the data asset
Curation turns a raw technical table into a governed, discoverable data product. The process is AI-first: You generate metadata automatically, then refine it.
In Catalog management > Assets, open the retail_sales_performance asset.
Choose Generate Descriptions and accept.
Choose Generate Terms and review (for example, Proprietary).
Add the Data Ownership metadata form and enter an owner (Jane Howard) and steward (Frank Smith).
Accept the automated column-level metadata.
Rename the asset to Retail Sales and Performance Analytics.
Choose Publish Asset.
Publishing makes the asset discoverable across the domain but does not grant access. Consumers must subscribe and be approved before they can query the data.
The technical table retail_sales_performance in the producer account becomes Retail Sales and Performance Analytics in the catalog—described in business language, classified, owned, and searchable across the domain—while the data itself never leaves the producer account.
Step 7: Create the consumer project
Sign in as the Data Analyst and open SageMaker Unified Studio.
Choose Create project.
Name it Data analysis and select the All Capabilities - Data Analysts profile. This provisions resources in the consumer account.
Specify a lakehouse database name such as data_analysis.
Review and choose Create project.
Step 8: Discover, subscribe, and query
The consumer now works entirely from its own account.
As the Data Analyst, open the Data analysis project and choose Catalog.
Search for sales and open the Retail Sales and Performance Analytics asset.
Review the business and technical metadata and choose Subscribe, adding a reason for the request.
As the Data Engineer, open the producer project, go to Catalog management > Subscription requests, open the request, set access to Full access, and choose Approve.
As the Data Analyst, on the Subscribed tab, open the asset and choose Query with Athena. The Query Editor opens with the retail_sales_performance table available in the data_analysis database, and a query returns the first rows, confirming access.
The analyst queries live producer data from their own account using their own tools. When the producer's pipeline refreshes the table, the analyst sees current data on the next query, with no sync job to maintain.
What's next
Scale the mesh: Associate more producer and consumer accounts and add project profiles.
Invest in governance: Expand your metadata forms and business glossaries before curating more tables.
Start small: Validate the end-to-end flow with a single producer and consumer pair and one published asset, then extend. Because consumers query the data in place, existing applications keep working as you extend the mesh.
What you learned
In this tutorial, you:
Associated producer and consumer accounts with a governance domain
Provisioned each team's tools with project profiles
Created a producer project and a reusable governance framework
Published a curated, classified, owned data asset to the shared catalog
Subscribed to and queried the asset from a different account, with no data movement