How to access AWS Athena tables from another account

Viewed 2225

I have 2 AWS accounts: Account1, and Account2. I have some data stored in S3 in Account1, and I registered that data into an Athena table in Account1. Now, I would like to access the same Athena table from Account2. I realize that I could create an Athena table in Account2 to query data in Account1, but ideally I would like to keep all the tables under Account1.

2 Answers

As of today, it seems possible only by deploying in Account2 (the account you want to query from) a Lambda with the proper cross-account permissions to access the data catalog in Account1.

See this other answer and the associated post on AWS blog.

Since May 2021 it is now possible to register a data catalog from a different account in Amazon Athena, see the User Guide.

Athena Query Engine v2 is required though and there are some other limitations.

Related