Skip to content

Conversation

ellisonbg
Copy link
Contributor

I did some research about the best way to get the AWS credentials and it looks like boto3 handles all of the most common cases in a standard manner that should work well in most cases. This simplifies the logic while fixing some of the cases that weren't working (such as pulling credentials from the EC2 instance metadata).

Warning: I wrote in code in the GitHub web editor so I didn't run it locally to verify it works. Please test locally before merging :-)

Copy link

github-actions bot commented Dec 7, 2024

Binder 👈 Launch a Binder on branch ellisonbg/jupyter-drives/s3-credentials

Copy link
Member

@DenisaCG DenisaCG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ellisonbg!

I tested it locally and it works well. I re-added some of the previously deleted logic, such that we can keep the extension open to other providers.

Now the extension will automatically check jupyter_notebook_config.py for credentials, if it is empty, it will try to extract the S3 credentials through boto and, if that is not possible, check the environment variables (other providers can make use of this). This way we can enable a seamless credentials extraction for S3, but also keep the logic to iterate on for other providers.

@DenisaCG DenisaCG added the enhancement New feature or request label Dec 9, 2024
@DenisaCG
Copy link
Member

Merging this now, but we can open a follow-up PR if there is any other aspect that needs to be addressed. Thank you @ellisonbg!

@DenisaCG DenisaCG merged commit 915ef3a into QuantStack:main Dec 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants