Tutorial: Subscribe to AWS Data Exchange for AWS Lake Formation (Test Product) on AWS Data Exchange (Preview) - AWS Data Exchange User Guide

Tutorial: Subscribe to AWS Data Exchange for AWS Lake Formation (Test Product) on AWS Data Exchange (Preview)

AWS Data Exchange for AWS Lake Formation (Test Product) is a free product that helps subscribers understand how to subscribe to and interact with an AWS Data Exchange product containing AWS Lake Formation data sets. You can use this product for testing purposes and learn how to query, analyze, and share data internally within minutes.

Subscribing to AWS Data Exchange for AWS Lake Formation (Test Product) on AWS Data Exchange (Preview)

The following procedure shows how to browse the AWS Data Exchange catalog to find and subscribe to AWS Data Exchange for Lake Formation (Test Product). (Preview)

To subscribe to AWS Data Exchange for Lake Formation (Preview)
  1. Open and sign in to the AWS Data Exchange console.

  2. From the left navigation pane, under Discover data products, choose Browse catalog.

  3. From the search bar, enter AWS Data Exchange for Lake Formation (Test product) and choose Enter.

  4. Choose AWS Data Exchange for Lake Formation (Test Product) to view its details page.

    1. (Optional) To view the data dictionary, scroll down to the product Overview section to see the data dictionary under Data dictionaries.

    2. (Optional) To download the data dictionary, choose the Data dictionary and samples tab, choose the option button next to Data dictionary, and then choose Download.

    3. (Optional) To preview the sample, choose the option button next to the sample name (AWS Data Exchange for Lake Formation (Test Product)), and then choose Preview sample (CSV only).

    4. (Optional) To download the sample, choose the option button next to the sample name (AWS Data Exchange for Lake Formation (Test Product)), and then choose Download.

  5. If you are previewing the sample, you can also choose Download in the sample preview dialog box.

  6. In the top right corner, choose Continue to subscribe.

  7. Choose your preferred price and duration combination and review the offer details, including the data subscription agreement.

    Note

    AWS Data Exchange for Lake Formation (Test Product) doesn't require subscription verification, but some products do. For more information, see Subscription verification for subscribers.

  8. Review the pricing information, choose the pricing offer, and then choose Subscribe.

    Note

    AWS Data Exchange for Lake Formation (Test product) is a free product. If you subscribe to a paid product, you are prompted to confirm your decision to subscribe.

It can take a few minutes for your subscription to become active after you choose Subscribe.

Navigating away from this page prior to your subscription becoming active will not prevent the subscription from processing.

Setting up and querying AWS Data Exchange for Lake Formation (Test Product) (Preview)

The following procedure shows how to set up and query a Lake Formation data permission set (Preview) using the AWS Management Console.

To enable querying on the AWS Data Exchange for Lake Formation (Test Product) data set (Preview)
  1. Open and sign in to the AWS Data Exchange console.

  2. From the left navigation pane under My subscriptions, choose Entitled data.

  3. From the list of Products, choose AWS Data Exchange for Lake Formation (Test Product) (Preview).

  4. Choose Accept to accept the AWS RAM share.

    Note

    You must accept the AWS RAM share within 12 hours of subscribing to the data product. If your AWS RAM share invitation expires, select Request invitation and allow several business days for a new share to be sent. You only need to accept the AWS RAM share once for each provider that you license Lake Formation data sets from.

  5. Open the Lake Formation console.

  6. Sign in as a principal who has the Lake Formation CREATE_TABLE or CREATE_DATABASE permission, as well as the glue:CreateTable or glue:CreateDatabase AWS Identity and Access Management (IAM) permission.

  7. In the navigation pane, choose Tables, and then choose Create table.

  8. On the Create table page, choose Resource Link, and then provide the following information:

    • Resource link name – Enter a name that adheres to the same rules as a table name. The name can be the same as the name of the target shared table.

    • Database – The database in the local Data Catalog must contain the resource link.

    • Shared table – Select one of the tables shared through AWS Data Exchange for Lake Formation (Test product). All of the table names shared through that product begin with adxlf_test, or enter a local (owned) or shared table name.

      The list contains all of the tables shared with your account. The database and owner account ID are listed with each table. If you don’t see a table that you know was shared with your account, check the following:

      • If you aren’t a data lake administrator, confirm with your administrator that you were granted Lake Formation permissions on the table.

      • If you’re a data lake administrator and your account is not the same AWS organization as the granting account, confirm that you’ve accepted the AWS Resource Access Manager (AWS RAM) resource share invitation for the table. For more information, see Accepting a resource share invitation from AWS RAM.

    • Shared table's database – If you selected a shared table from the list, this field is populated with the shared table's database in the external account. If you didn't select a shared table, enter a local database for a resource link to a local table, or the shared table's database in the external account.

    • Shared table owner – If you selected a shared table from the list, this field is populated with the shared table's owner account ID. If you didn't select a shared table, enter your AWS account ID for a resource link to a local table, or the ID of the AWS account that shared the table.

To query the AWS Data Exchange for Lake Formation (Test Product) data set (Preview) with Amazon Athena (Console)
  1. Sign in to the Amazon Athena console with a role that has permissions for Amazon Athena.

  2. In the Amazon Athena query editor, choose the resource link that you created previously.

  3. Choose the additional menu options icon next to source_data and choose Preview table.

  4. Choose Run query.

To allow querying on the AWS Data Exchange for Lake Formation (Test Product) data set (Preview) (AWS CLI)
  1. To retrieve a list of all invitations available to your AWS account, enter the following command. The AWS CLI query parameter lets you restrict the output to only those invitations shared from AWS Data Exchange.

    $ aws ram get-resource-share-invitations

    --region us-east-1

    --query 'resourceShareInvitations[?

    senderAccountId==147854383891]'

  2. Find the invitations for the AWS Data Exchange for Lake Formation data set. Then, note the resourceShareInvitationArn in the output to use in the following command to accept the invitation.

    $ aws ram accept-resource-share-invitation --region us-east-1 --resource-share-invitation-arn [resourceShareInvitationArn]

    If successful, the response shows that the status has changed from PENDING to ACCEPTED.

  3. Create a resource link to one of the tables shared through the AWS Data Exchange for Lake Formation data set with the following command:

    aws glue create-table --database-name [local_database_to_store_resource_link] --table-input '{"Name":"resource_link_name","TargetTable":{"CatalogId":"[account_owning_original_table]","DatabaseName":"[shared_db_in_provider_account]","Name":"[shared_table_in_provider_account]"}}'.

    Note

    To create resource links, use the Lake Formation CREATE_TABLE or CREATE_DATABASE permission, as well as the glue:CreateTable or glue:CreateDatabase IAM permission.