aws.s3 icon indicating copy to clipboard operation
aws.s3 copied to clipboard

aws s3 mv correlate function

Open LiNk-NY opened this issue 6 years ago • 3 comments

Hi Thomas, @leeper Perhaps you can export a function that is similar to what aws s3 mv does. https://docs.aws.amazon.com/cli/latest/reference/s3/mv.html

Please specify whether your issue is about:

  • [x] a suggested code or documentation change, improvement to the code, or feature request

If there is no comparable API query, it could be the combination of copy_object and delete_object.

## load package
library("aws.s3")

## code goes here
mv_object <- function(from_object, to_object, from_bucket, to_bucket, headers = list(), ...) {
    copy_object(from_object = from_object, to_object = to_object, from_bucket = from_bucket,
         to_bucket = to_bucket, headers = headers, ...)
    message("Removing object in: ", file.path(from_bucket, from_object))
    delete_object(object = from_object, bucket = from_bucket)
}

Best regards, Marcel

LiNk-NY avatar Dec 10 '18 23:12 LiNk-NY

Tagging @acolum since it seems that they are the current maintainer.

abelcastilloavant avatar Dec 11 '18 14:12 abelcastilloavant

Thanks @abelcastilloavant for tagging me.

@LiNk-NY , I'm a bit busy this week, but I hope to resolve your issue soon.

acolum avatar Dec 11 '18 16:12 acolum

Any updates on this? @acolum Thanks :)

LiNk-NY avatar Feb 04 '19 22:02 LiNk-NY