AWS Athena table 不同区域的存储桶失败

AWS Athena table with bucket in different region failing

我需要查询Athena运行以外地区的数据。

试试这个:https://docs.aws.amazon.com/athena/latest/ug/json.html 按照文档,即使我无法在同一地区查询存储桶。

假设我现在的S3和Athena都是us-east-1,那么

地点's3://mybucket/data/'。 (工作)

位置's3://mybucket-us-east-1/data/'(不工作)

我需要从eu-central-1查询数据 位置 's3://my-another-bucket-eu-central-1/data/'(不工作)

有帮助吗?

错误: 失败:执行错误,return 来自 org.apache.hadoop.hive.ql.exec.DDLTask 的代码 1。 com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.s3.model.AmazonS3Exception:指定的存储桶不存在(服务:Amazon S3;状态代码:404;错误代码:NoSuchBucket;

我相信 JSON SerDe Libraries 页面中的注释特定于 s3://athena-examples-us-east-1 和其他地区的亚马逊 Athena 示例数据:

Note

You can query data in regions other than the region where you run Athena. Standard inter-region data transfer rates for Amazon S3 apply in addition to standard Athena charges. To reduce data transfer charges, replace myregion in s3://athena-examples-myregion/path/to/data/ with the region identifier where you run Athena, for example, s3://athena-examples-us-east-1/path/to/data/.

您应该通过名称引用您自己的存储桶,即使它们位于另一个区域,它们也应该可以工作。