I want to give access to JupyterHub users so they can use data in AWS S3. I would appreciate if anyone explain how to set up for this usage.
Also, I would prefer if there is a way to not to give AWS credentials to the JupyterHub users but they would be just allowed to have access to data in AWS S3.
Thank you!
You would definitely need an IAM user
configured with the right permissions to access the S3 bucket you need (or if you need full rights on all S3 buckets, you could attach the AmazonS3FullAccess
policy to your IAM user
).
Then on Jupyterhub
you would need to have the AWS CLI installed so that you could run the aws configure
command, by which you'd be able to configure the credentials of this IAM user
in the .credentials
file for AWS on Jupyterhub.
Once this is all done, you could use either the CLI
or the boto3
library to interact with your S3 bucket from a Jupyterhub notebook.
You can use S3 as a file system in JupyterNotebboks with this extension: https://github.com/danielfrg/s3contents
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.