Google colaboratory 无法从Google Colaboratory查询AWS athena

Google colaboratory 无法从Google Colaboratory查询AWS athena,google-colaboratory,amazon-athena,pyathena,Google Colaboratory,Amazon Athena,Pyathena,我想通过Googlecolaboratorial上的pyathena执行对AWSathena的查询。 但是NoCredentialsError将发生 NoCredentialsError:找不到凭据 由于在sagemaker中运行相同的代码将成功,我认为代码和用户权限没有问题。 有人知道这个解决方案吗?您是否使用aws\u access\u key\u id和aws\u secret\u access\u key初始化了pyathena客户端?我以前将连接函数的参数写为“access\u key

我想通过
Google
colaboratorial
上的
pyathena
执行对AWS
athena
的查询。 但是
NoCredentialsError
将发生

NoCredentialsError:找不到凭据

由于在sagemaker中运行相同的代码将成功,我认为代码和用户权限没有问题。
有人知道这个解决方案吗?

您是否使用
aws\u access\u key\u id
aws\u secret\u access\u key
初始化了pyathena客户端?我以前将连接函数的参数写为“access\u key”access_key'是pyathenaJDBC的一个参数。将参数更改为“aws\u access\u key\u id”后,我修复了它。很抱歉这是我的误解,谢谢你的回复@Chou很高兴听到您解决了这个问题:>您是否使用
aws\u access\u key\u id
aws\u secret\u access\u key
初始化了pyathena客户端?我以前将连接函数的参数写成“access\u key”access_key'是pyathenaJDBC的一个参数。将参数更改为“aws\u access\u key\u id”后,我修复了它。很抱歉这是我的误解,谢谢你的回复@很高兴听到你解决了这个问题:>