アテナでクエリを実行しようとしていますが、失敗します。アテーナのクエリがboto3で失敗する(S3の位置が無効)
コード:
client.start_query_execution(QueryString="CREATE DATABASE IF NOT EXISTS db;",
QueryExecutionContext={'Database': 'db'},
ResultConfiguration={
'OutputLocation': "s3://my-bucket/",
'EncryptionConfiguration': {
'EncryptionOption': 'SSE-S3'
}
})
しかし、それは次の例外発生させます:私はアテナコンソールに行く場合は、[設定]に移動し、(例えば)同じS3の場所を入力し
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.
を:
クエリが正常に実行します。
私のコードで何が問題になっていますか?私はいくつかの他のサービス(例えばS3)のAPIをうまく使ってきましたが、この中でいくつかの間違ったパラメータを渡していると思います。ありがとう。
Python:3.6.1。 Boto3:1.4.4