S3 object opsAWS CLI
aws s3 cp
Copy a single file or entire directory to and from S3 buckets.
Command
aws s3 cp s3:///
Example usage
Transfer individual files between local storage and S3.
aws s3 cp <local_path> s3://<bucket>/<key>
aws s3 cp s3://<bucket>/<key> <local_path>
Upload directories recursively with key prefixes.
aws s3 cp <local_dir> s3://<bucket>/<prefix> --recursive
Related tags
S3 object opsclouds3ec2iam