我正在尝试使用 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
不同情况的例外:
outputLocation 不是有效的 S3 路径。提供https://s3.us-east-2.amazonaws.com/testbucket/one/2018-02-06/
无法验证/创建输出存储桶 testbucket。提供 s3://testbucket/one/2018-02-06/
无法验证/创建输出存储桶 testbucket。提供测试桶
有人可以帮助我使用正确的 s3 格式吗?
提前致谢。