Skip to main content

cp

The aws s3 cp command is used to copy local files to Amazon S3 buckets. It provides a simple and efficient way to transfer data from your local system to AWS cloud storage. This command supports various parameters to customize the copy operation, including:

Syntax

From local to remote

aws s3 cp /path/to/file s3://destinationbucket/destinationobject

From remote to local

aws s3 cp s3://destinationbucket/destinationobject /path/to/file

Copy all directory from remote to local

aws s3 cp --recursive s3://destinationbucket/destination/directory /path/to/dir/

Options

  • source: s3://bucketname/dest/to/object || /path/to/local/file: The local path of the file you want to copy.
  • destination: s3://bucketname/dest/to/object || /path/to/local/file: The location in Amazon S3 where you want to copy the file.

  • --recursive: The recursive options for applying directory

By using aws s3 cp, you can easily integrate file transfers to Astran Continuity Cloud into your scripts and workflows.

See also the original AWS documentation.