Search code examples
fileamazon-web-servicesamazon-s3move

AWS files moved to unknown location


I was moving files from one key in an S3 bucket to another key in the same bucket and accidentally gave 3:// instead of s3:// for the destination. The files got actually moved to the unknown location and I was unable to trace them. When I try to do aws s3 ls 3://... it says address not found. Does S3 interpret 3:// as a special path or location? Please advice.

aws s3 mv s3://bucketnm/sample/data/instnc=2014* 3:/bucketnm/sample2/data/instnc=2014*

Solution

  • It would have created a directory called 3: in the location where you executed the aws s3 mv command.

    Since 3:/bucketnm/sample2/data/instnc=2014* is not a valid S3 path, It interprets this as local filesystem path and will create the entire directory structure in the filesystem, and then move the contents from S3 bucket to your local filesystem.