aws-s3-mv
Move files to, from, and between S3 buckets
TLDR
Move a local file to S3
SYNOPSIS
aws s3 mv source destination [options]
DESCRIPTION
aws s3 mv moves files between the local filesystem and Amazon S3, or between S3 locations. The command copies the source to the destination and then deletes the source object or file.
The source and destination can be a LocalPath or an S3Uri (s3://bucket-name/key). For S3 to S3 moves, the command performs a server-side copy followed by deletion of the source.
PARAMETERS
--recursive
Move all files and objects under the specified directory or S3 prefix--dryrun
Display operations that would be performed without executing them--quiet
Suppress output during the move operation--include pattern
Include files matching the pattern (used with --exclude)--exclude pattern
Exclude files matching the pattern from the move operation--acl value
Set access control list: private, public-read, public-read-write, authenticated-read--storage-class value
Specify storage class: STANDARD, REDUCEDREDUNDANCY, STANDARDIA, GLACIER--sse value
Enable server-side encryption: AES256 or aws:kms--no-overwrite
Prevent overwriting existing files at the destination--validate-same-s3-paths
Verify source and destination resolve to different locations (safety check)
CAVEATS
When using access point ARNs or aliases, ensure source and destination resolve to different buckets to prevent accidental self-deletion. Use --validate-same-s3-paths for safety. The source is only deleted after successful copy; if the copy fails, the source remains intact.
