简体   繁体   中英

Move files from one folder to another folder in aws S3 with ex_aws library in elixir

I have a file present inside IN folder on S3 bucket with key as in/c05cf611db4b4a72a8a254fcf4355fb7-sample1.csv". Now I want to move this file inside another folder ARCHIEVE_IN so that it's key changes to archieve_in/c05cf611db4b4a72a8a254fcf4355fb7-sample1.csv".

Is there a way to achieve this functionality with the ex_aws library.

S3 doesn't have a built in "move" operation. You can instead use ExAws.S3.put_object_copy to copy the file to a new place and then ExAws.S3.delete_object to delete the old file.

and there? got? can you tell me how your script turned out? I need to do the same

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM