小编kaa*_*man的帖子

outputLocation 不是有效的 S3 路径。雅典娜例外

我正在尝试使用 C# athena 驱动程序执行 athena 查询。

Amazon.Athena.Model.ResultConfiguration resultConfig = new Amazon.Athena.Model.ResultConfiguration();
resultConfig.OutputLocation = "https://s3.us-east-2.amazonaws.com/testbucket/one/2018-02-06/";
//other inputs i have tried
//"s3://testbucket/one/2018-02-06/"
//testbucket

//Populate the request object
                Amazon.Athena.Model.StartQueryExecutionRequest queryExec = new Amazon.Athena.Model.StartQueryExecutionRequest();
                queryExec.QueryString = query.QueryString;
                queryExec.QueryExecutionContext = queryExecutionContext;
                queryExec.ResultConfiguration = resultConfig;

StartQueryExecutionResponse athenaResponse = athenaClient.StartQueryExecution(queryExec);//throws exception
Run Code Online (Sandbox Code Playgroud)

不同情况的例外:

  1. outputLocation 不是有效的 S3 路径。提供https://s3.us-east-2.amazonaws.com/testbucket/one/2018-02-06/

  2. 无法验证/创建输出存储桶 testbucket。提供 s3://testbucket/one/2018-02-06/

  3. 无法验证/创建输出存储桶 testbucket。提供测试桶

有人可以帮我找到正确的 s3 格式吗?

提前致谢。

c# amazon-s3 amazon-web-services s3-bucket amazon-athena

5
推荐指数
1
解决办法
1万
查看次数