1

I want to execute a query to AWS athena by pyathena on Google Colaboratory. But NoCredentialsError will occur.

NoCredentialsError: Unable to locate credentials

As running the same code in sagemaker will succeed, I think the code and user permissions has no problem. Does anyone know the solution?

Red Boy
  • 5,429
  • 3
  • 28
  • 41
michi kan
  • 51
  • 4
  • Did you init your pyathena client with `aws_access_key_id` and `aws_secret_access_key ` ? – willisc Jun 29 '19 at 09:42
  • I used to write connect function's argument as 'access_key'. 'access_key' is an argument of pyathenaJDBC. After changing the argument to 'aws_access_key_id', I fixed it. I'm sorry it's my misunderstanding and thanks for reply. @ChouW – michi kan Jun 29 '19 at 14:27
  • Glad to hear you fixed the problem : > – willisc Jun 29 '19 at 15:24

0 Answers0