我想在雅典娜執行查詢,但它失敗。雅典娜查詢失敗與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'
}
})
但它會引發以下異常:
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位置(例如) :
查詢運行正常。
我的代碼有什麼問題?我已經成功地使用了其他幾個服務(例如S3)的API,但在這一個中,我相信我傳遞了一些不正確的參數。謝謝。
Python:3.6.1。 Boto3:1.4.4