Prerequisites
Data Catalog set to use LF permissions (both checkboxes are unchecked and cross-account version is set to 3 or higher). Details: https://docs.aws.amazon.com/lake-formation/latest/dg/initial-lf-config.html#setup-change-cat-settings
Lake Formation admin role configured
Producer Account:
create DATASHARE <Producer_DS> set publicaccessible false;
Alter datashare Producer_DS add schema public;
Alter datashare Producer_DS add table public.<table name>;
GRANT USAGE ON DATASHARE Producer_DS TO ACCOUNT '<Account id>'; ---central data governance account id
GRANT ALTER, SHARE ON DATASHARE Producer_DS To "<DB Role Name>";
Go to Redshift > Data shares > Accept Invitation
Lake Formation Account:
Admin to Accept the invitation of Data Share created from Producer
Now, Create a database from Data share by giving it a name
Grant usage/select permissions to the external Consumer account
Grant usage/select permissions to the role “DB Role name of Consumer"
Consumer Account:
Consume the data share from Lake formation
CREATE DATABASE <database name> FROM ARN 'arn:aws:glue:<region>:<account id>:database/<Lake formation database name>' WITH DATA CATALOG SCHEMA <Lake formation database name>;
Grant usage on database <database name> to "<Role name>"
No comments:
Post a Comment