0

I'm using a jupyter notebook, and I'm trying to query AWS athena using PyAthena module, via the notebook.

My first line in the project is:

athena = pyathena.connect(profile_name="NAME")

which works in any other platform on my computer (iPython, Pycharm..) but doesn't work on the Jupyter Notebook, and returns:

ProfileNotFound: The config profile (core) could not be found

I tried changing the env variable like so: !set AWS_CONFIG_FILE="~/.aws/config" but it didn't work.

Any ideas?

Golden
  • 407
  • 2
  • 12
  • Is your notebook running under the correct user? Maybe its running as root or some other user, and your profile is created for a regular user? – Marcin Oct 11 '20 at 09:00
  • only one user on the computer, and not running as root.. – Golden Oct 11 '20 at 09:04
  • can you confirm the user name, `!whoami`? `pyathena` works normally in notebook. So if its corrent user, you must somehow misconfigured your notebook. – Marcin Oct 11 '20 at 09:12
  • it says "/bin/sh: 1: whoami: Permission denied" – Golden Oct 11 '20 at 13:21

0 Answers0