跳至内容

Athena Cross-Querying S3 bucket in me-central-1

0

Hello,

I am using Athena in us-east-2 and have tables that have locations to s3 buckets that are in many different regions. I have no problem querying any other region except for me-centra-1, which gives me this error: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Bad Request (Service: Amazon S3; Status Code: 400; Error Code: 400 Bad Request. This is not a permissions issue. When I perform aws s3 ls against that region, I have to include --region me-central-1. How do I fix this, as Athena syntax to my knowledge does not support a region argument when specifying s3 bucket location. I do not want to query with Athena in that region, or cross-replicate bucket.

已提问 2 年前1066 查看次数

1 回答
0

The first thing that comes to mind is that me-central-1 is one of the opt-in regions, so it isn't enabled by default. If the S3 bucket is in a different AWS account from the account where you're running Athena, I believe you'll have to enable the region in both accounts, so that the security tokens Athena obtains in account A to access the bucket in the opt-in region in account B will be valid for the target region.

专家

已回答 2 年前

专家

已审核 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。