Last updated: Feb 26, 2024
Reading time·2 min
The reason the "Following Arguments are Required - Paths" error occurs in AWS
CLI is when the paths argument is not provided to the aws s3 cp
command.
To solve the "Following Arguments are Required - Paths" error, set the path
argument in the call to aws s3 cp
.
To copy local files to an S3 bucket use the following syntax.
aws s3 cp my-file.txt s3://my-bucket/my-file.txt
When copying an S3 object to a local file, use the following syntax.
aws s3 cp s3://bucket-name/my-file.txt my-file.txt
When copying an S3 object from one bucket to another use the following syntax.
aws s3 cp s3://source-bucket/file.ext s3://destination-bucket/file.ext
For more examples on the aws s3 cp
command, check out the examples section of
the
docs.
aws s3 cp
command keep in mind that the CLI expects a source
and a destination
, so a total of 2 paths should be provided.