查询 Athena 时出现 boto3 UnrecognizedClientException
boto3 UnrecognizedClientException when querying Athena
我正在使用下面列出的代码创建一个 Athena 客户端 -
client = boto3.client('athena',aws_access_key_id='<access key id>',aws_secret_access_key='<secret access key>',region_name='us-east-1')
那我正在用这个客户端查询Athena -
response = client.start_query_execution(QueryString=query_string,QueryExecutionContext={'Database': database},WorkGroup=workgroup)
我看到以下错误。你能告诉我我可能遗漏了什么吗?
botocore.exceptions.ClientError: An error occurred
(UnrecognizedClientException) when calling the StartQueryExecution
operation: The security token included in the request is invalid.
您能检查一下您的 aws 密钥详细信息吗?。错误表示 aws 密钥无效。
我正在使用下面列出的代码创建一个 Athena 客户端 -
client = boto3.client('athena',aws_access_key_id='<access key id>',aws_secret_access_key='<secret access key>',region_name='us-east-1')
那我正在用这个客户端查询Athena -
response = client.start_query_execution(QueryString=query_string,QueryExecutionContext={'Database': database},WorkGroup=workgroup)
我看到以下错误。你能告诉我我可能遗漏了什么吗?
botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the StartQueryExecution operation: The security token included in the request is invalid.
您能检查一下您的 aws 密钥详细信息吗?。错误表示 aws 密钥无效。