Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3Contents didn't read EC2 IAM role credentials #137

Open
VahagnBleyan opened this issue Feb 10, 2022 · 1 comment
Open

S3Contents didn't read EC2 IAM role credentials #137

VahagnBleyan opened this issue Feb 10, 2022 · 1 comment

Comments

@VahagnBleyan
Copy link

VahagnBleyan commented Feb 10, 2022

New version of s3Contents fails to add s3 bucket with error
botocore.exceptions.NoCredentialsError: Unable to locate credentials

If I set aws access/secret keys it works. But ))
your hack with root_dir for jupyterlab prevents correct start of notebook in s3. it throws error like this:
AttributeError: 'SingleUserNotebookApp' object has no attribute 'root_dir'
I fix it just commenting your hack part in genericmanager.py

I have correct iam accesses to s3 and it's correctly attached as instance profile iam role to ec2 instance. I have checked with aws cli and get access to s3 without any credentials.

my config for s3contents is

from s3contents import S3ContentsManager
import os  
c = get_config()
c.NotebookApp.contents_manager_class = S3ContentsManager
c.S3ContentsManager.bucket = "some-bucket"
c.S3ContentsManager.prefix = "some-notebooks"

This configuration works on s3Contents old version.

@AbdealiLoKo
Copy link
Contributor

I have the same error.
@VahagnBleyan could you elaborate on what needs to be commented ?
@danielfrg any plan on a fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants