Creating a Resource Link to a Shared Data Catalog Database - AWS Lake Formation

Creating a Resource Link to a Shared Data Catalog Database

You can create a resource link to a shared database by using the AWS Lake Formation console, API, or AWS Command Line Interface (AWS CLI).

To create a resource link to a shared database (console)

  1. Open the AWS Lake Formation console at https://console.aws.amazon.com/lakeformation/. Sign in as a data lake administrator or as a database creator.

    A database creator is a principal who has been granted the Lake Formation CREATE_DATABASE permission.

  2. In the navigation pane, choose Databases, and then choose Create database.

  3. On the Create database page, choose the Resource Link tile, and then provide the following information:

    Resource link name

    Enter a name that adheres to the same rules as a database name. The name can be the same as the target shared database.

    Shared database

    Choose a database from the list, or enter a local (owned) or shared database name.

    The list contains all the databases shared with your account. Note the owner account ID that is listed with each database. If you don't see a database that you know was shared with your account, check the following:

    • If you aren't a data lake administrator, check that the data lake administrator granted you Lake Formation permissions on the database.

    • If you are a data lake administrator, and your account is not in the same AWS organization as the granting account, ensure that you have accepted the AWS Resource Access Manager (AWS RAM) resource share invitation for the database. For more information, see Accepting a Resource Share Invitation from AWS RAM.

    Shared database owner

    If you selected a shared database from the list, this field is populated with the shared database's owner account ID. Otherwise, enter your AWS account ID (for a resource link to a local database) or the ID of the AWS account that shared the database.

    
            The Database details dialog box has the Resource link radio button selected,
              with the following fields filled in: Resource link name, Shared database, Shared
              database owner ID. Shared database owner ID is disabled (read-only).
  4. Choose Create to create the resource link.

    You can then view the resource link name under the Name column on the Databases page.

  5. (Optional) Grant the Lake Formation DESCRIBE permission to principals that must be able to view the link and access the link target through the link.

To create a resource link to a shared database (AWS CLI)

  1. Enter a command similar to the following.

    aws glue create-database --database-input '{"Name":"myissues","TargetDatabase":{"CatalogId":"111122223333","DatabaseName":"issues"}}'

    This command creates a resource link named myissues to the shared database issues, which is in the AWS account 1111-2222-3333.

  2. (Optional) Grant the Lake Formation DESCRIBE permission to principals that must be able to view the link and access the link target through the link.