-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[Core] fail to download s3 py modules #49332
base: master
Are you sure you want to change the base?
[Core] fail to download s3 py modules #49332
Conversation
Signed-off-by: Xie Yifan <yifan.xie@shopee.com>
@@ -784,7 +785,20 @@ async def download_and_unpack_package( | |||
"`pip install boto3` to fetch URIs in s3 " | |||
"bucket. " + install_warning | |||
) | |||
tp = {"client": boto3.client("s3")} | |||
s3_kwargs = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @laysfire , not a ray maintainer but I will suggest adding a test case for your change.
@laysfire I have already assigned my colleagues to review this PR. Would you mind fixing the conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several things:
- Code change looks ok to me
- This is an interface change, you need to document two new env vars: https://github.com/ray-project/ray/blob/master/doc/source/ray-core/handling-dependencies.rst#api-reference
- @rynewang / @jjyao Do we have security concern on storing key directly in text format in env?
s3_kwargs["aws_secret_access_key"] = env_vars[ | ||
"AWS_SECRET_ACCESS_KEY" | ||
] | ||
tp = {"client": boto3.client("s3", **s3_kwargs)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html, we can save credentials to ~/.aws/credentials
and everything should work?
LGTM, @jjyao any concerns? |
Is there any other solutions? At least we should update the doc to mention this approach otherwise no one will know it. |
Why are these changes needed?
In our scenario, the users would upload working dir or py modules to s3 and submit job with filling security credential in runtime env.
Currently Ray doesn't support fetch security credential information from user runtime env, so the job would fail when download s3 resources.
This PR is to fix this issue.
Related issue number
None
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.