Registering an Amazon Glue Data Catalog from another account - Amazon Athena
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Registering an Amazon Glue Data Catalog from another account

You can use Athena's cross-account Amazon Glue catalog feature to register an Amazon Glue catalog from an account other than your own. After you configure the required IAM permissions for Amazon Glue and register the catalog as an Athena DataCatalog resource, you can use Athena to run cross-account queries. For information about configuring the required permissions, see Cross-account access to Amazon Glue data catalogs.

The following procedure shows you how to use the Athena console to configure an Amazon Glue Data Catalog in an Amazon Web Services account other than your own as a data source.

To register an Amazon Glue Data Catalog from another account
  1. Follow the steps in Cross-account access to Amazon Glue data catalogs to ensure that you have permissions to query the data catalog in the other account.

  2. Open the Athena console at https://console.amazonaws.cn/athena/.

  3. If the console navigation pane is not visible, choose the expansion menu on the left.

    
                            Choose the expansion menu.
  4. Choose Data sources.

  5. On the upper right, choose Create data source.

  6. On the Choose a data source page, for Data sources, choose S3 - Amazon Glue Data Catalog, and then choose Next.

  7. On the Enter data source details page, in the Amazon Glue Data Catalog section, for Choose an Amazon Glue Data Catalog, choose Amazon Glue Data Catalog in another account.

  8. For Data source details, enter the following information:

    • Data source name – Enter the name that you want to use in your SQL queries to refer to the data catalog in the other account.

    • Description – (Optional) Enter a description of the data catalog in the other account.

    • Catalog ID – Enter the 12-digit Amazon Web Services account ID of the account to which the data catalog belongs. The Amazon Web Services account ID is the catalog ID.

  9. (Optional) For Tags, enter key-value pairs that you want to associate with the data source. For more information about tags, see Tagging Athena resources.

  10. Choose Next.

  11. On the Review and create page, review the information that you provided, and then choose Create data source. The Data source details page lists the databases and tags for the data catalog that you registered.

  12. Choose Data sources. The data catalog that you registered is listed in the Data source name column.

  13. To view or edit information about the data catalog, choose the catalog, and then choose Actions, Edit.

  14. To delete the new data catalog, choose the catalog, and then choose Actions, Delete.

For more information, see Query cross-account Amazon Glue Data Catalogs using Amazon Athena in the Amazon Big Data Blog.