<p>我试图在雅典娜中执行一个查询,但失败了。</p>
<p>代码:</p>
<pre><code>client.start_query_execution(QueryString="CREATE DATABASE IF NOT EXISTS db;",
QueryExecutionContext={'Database': 'db'},
ResultConfiguration={
'OutputLocation': "s3://my-bucket/",
'EncryptionConfiguration': {
'EncryptionOption': 'SSE-S3'
}
})
</code></pre>
<p>但它提出了以下例外:</p>
<pre><code>botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException)
when calling the StartQueryExecution operation: The S3 location provided to save your
query results is invalid. Please check your S3 location is correct and is in the same
region and try again. If you continue to see the issue, contact customer support
for further assistance.
</code></pre>
<p>但是,如果我转到雅典娜控制台,请转到“设置”并输入相同的S3位置(例如):</p>
<p><a href="https://i.stack.imgur.com/lij8R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lij8R.png" alt="athena settings"/></a></p>
<p>查询运行正常。</p>
<p>我的密码怎么了?我已经成功地使用了其他几个服务(如S3)的API,但是在这个服务中,我相信我传递了一些不正确的参数。谢谢。</p>
<p>Python:3.6.1。博特3:1.4.4</p>