Athena database access in different account

Can QuickSight access Athena database in different AWS account?
i.e, QuickSight instance is in account A, and try to access Athena database in account B.

I found this document Use Amazon Athena and Amazon QuickSight in a cross-account environment | AWS Big Data Blog but it shows the Athena database in the same account with QuickSight, which connects cross-account Glue catalog.

Hi

For cross account you need to use VPC Peering.

Would you elaborate how that would look like?
Do we also need cross-account access IAM role for this?
Is there any guidance to achieve this?

Hi @hoyeon - Thanks for the post and shared the link. The idea is to create the database in the same account of quicksight but it will point to the glue crawler of the other account ( this will ensure the data resides in other account only) and this way you can built the dashboard. This is the correct solution approach.

By saying this, lets hear from other experts, tagging @DylanM , @duncan

Regards - Sanjeeb

2 Likes

Hello @hoyeon, the last response from @Sanjeeb2022 was spot on with the requirements to complete this task. I will mark his response as the solution, but please let us know if you have any remaining questions. Thank you!

@DylanM @Sanjeeb2022
We want to connect an Athena database and a glue catalog in my team’s account from a QuickSight instance in another team’s account.
I read your comments that is not available yet.

Hi @hoyeon - You can follow the below approach.

  1. In the QuickSight account, connect to Athena ( Same account).
  2. Athena will connect with Glue data catalog for the another account.
  3. You can use the data of different account and visualize in the current QS account.

See the diagram below.

Link - Use Amazon Athena and Amazon QuickSight in a cross-account environment | AWS Big Data Blog

Regards,
Sanjeeb

1 Like

@Sanjeeb2022
QuickSight can access the local Athena database with shared Glue catalog. It cannot access multiple Athena databases?

Hello @hoyeon, the limitation here is that the Athena database needs to be within the same account as QuickSight. The Glue data catalog is to bring the data from other accounts into the Athena account that matches with QuickSight. You won’t be able to connect with an Athena account that is in a different AWS account. You can bring in many tables/views from the Athena account, run custom SQL queries, and build multiple datasets within QuickSight from the data in Athena.

Does that help to clear up some of the confusion?