Is it possible to access Athena from another account in AWS?
For example: Athena set up in Account A
lambda set up in Account B
can the lambda or any service in Account B obtain access to Athena in Account A via jdbc connection?
Connection connection = DriverManager.getConnection("jdbc:athena:default", properties))
I cant see how this would be possible?
To enable an AWS Lambda function in Account-A to use Amazon Athena in Account-B, you should:
AssumeRole
from the IAM Role used by the AWS Lambda function in Account-AAssumeRole()
to assume the above IAM Role, then use the returned credentials to access Amazon Athena in Account-BSee also: Cross-account access in Athena to Amazon S3 buckets - Amazon Athena