Add folder in Amazon s3 bucket

前端 未结 16 1363
青春惊慌失措
青春惊慌失措 2021-02-06 23:34

I want to add Folder in my amazon s3 bucket using coding. Can you please suggest me how to achieve this?

16条回答
  •  攒了一身酷
    2021-02-06 23:42

    Here's how you can achieve what you're looking for (from code/cli):

    --create/select the file (locally) which you want to move to the folder:
    
    ~/Desktop> touch file_to_move
    
    --move the file to s3 folder by executing:
    
    ~/Desktop> aws s3 cp file_to_move s3:////
    

    A new folder will be created on your s3 bucket and you'll now be able to execute cp, mv, rm ... statements i.e. manage the folder as usual.

    If this new file created above is not required, simply delete it. You now have an s3 bucket created.

提交回复
热议问题