Forrest logo
back to the aws tool

aws-s3-mv:tldr:1f176

aws-s3-mv: Move a specific S3 object into another bucket.
$ aws s3 mv s3://${bucket_name1}/${filename} s3://${bucket_name2}/${path-to-target}
try on your machine

This command is used to move a file from one Amazon S3 bucket to another. Here's a breakdown of each component:

  • aws s3 mv: This is the AWS Command Line Interface (CLI) command for moving files between S3 buckets. mv stands for "move".
  • s3://${bucket_name1}/${filename}: This is the source file that you want to move. ${bucket_name1} is the name of the source bucket, and ${filename} is the name of the file.
  • s3://${bucket_name2}/${path-to-target}: This is the destination path where you want the file to be moved. ${bucket_name2} is the name of the destination bucket, and ${path-to-target} is the directory structure and target filename in the destination bucket.

Basically, this command will move the file located at s3://${bucket_name1}/${filename} to the path s3://${bucket_name2}/${path-to-target}. Note that the files in the source bucket will not be deleted after the move operation unless you explicitly perform a delete operation.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the aws tool