-
Notifications
You must be signed in to change notification settings - Fork 1.2k
For Cross Account S3 buckets - DVC Add gives put object access denied exception even after providing ACL of bucket-owner-full-control. #4887
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
Comments
@Nasreen23 are you able to execute some pure |
@pared The thing here is that @Nasreen23 is using
@Nasreen23 Could you elaborate on your scenario, please? |
More context on this (I think), @Nasreen23 correct me if I put the wrong links: https://discord.com/channels/485586884165107732/485596304961962003/774103813161353246 @Nasreen23 I've started looking into this, but I don't have enough experience with S3 ACL to be honest. So it would take a while on my end. |
@shcheklein : Yes Ivan, that's right. As discussed in the dvc dev-talk forum, have created this issue and provided the solution. |
@Nasreen23 Could you elaborate on why you are using |
@efiop - This is our use case for which I am trying to use dvc add --external. To achieve this- we are using the dvc add --external feature which will cache the input data set in a cache remote location(i.e. on s3). We aren't saving the local copies of input data set rather using Git to maintain the .dvc files. How can we do the dvc push without doing a dvc add which will create my cache file in the cache s3 location ? |
@Nasreen23 Thanks, I'm just making sure you are aware of potential consequenses of using |
Hello efiop, yes that is the desired outcome for us. |
@efiop - Having explained the use case for which we are using dvc add --external feature, did you happen to look at the suggested solution? |
@Nasreen23 Sorry for the delay. Unfortunately I wasn't able to look deeper into your case, but the reason I was asking you about whether or not regular dvc workflow works with
instead of what you did before. Overall, please be aware that this is not a core dvc scenario and it might be buggy and we might change the behavior in the future versions. So you are venturing into this more or less at your own risk. We can only recommend regular workflow without --external. |
Closing as stale. |
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Please provide information about your setup
Working with DVC remote s3.
The input file and cache location are on AWS S3 bucket.
Output of
dvc version
:1.9.1
$ dvc version
Additional Information (if any):
Performing DVC add with an input file located on cross account s3 bucket and cache path is also being referred to the same bucket.
Using acl config of bucket-owner-full-control for the remote s3 and not allowed to use the other grant options per our requirement.
Below are the steps that can be followed.
Please find below the solution for the same as discussed in the dev talk forum.
Solution: The line number 238 in s3.py file has been modified as below. The ACL parameter has been passed to the obj.put call that's being done.
This is required in the scenario where we are allowed to use only bucket owner acl and cannot use any other grant permissions due to the restrictions imposed on our AWS account policies.
Below is the method where the change has been done.
def makedirs(self, path_info):
# We need to support creating empty directories, which means
# creating an object with an empty body and a trailing slash
/
.#
# We are not creating directory objects for every parent prefix,
# as it is not required.
if not path_info.path:
return
The text was updated successfully, but these errors were encountered: