The Following Arguments are Required - Paths Error [Solved]

avatar
Borislav Hadzhiev

Last updated: Feb 26, 2024
2 min

banner

# The Following Arguments are Required - Paths Error [Solved]

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.

following arguments required error

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.

shell
aws s3 cp my-file.txt s3://my-bucket/my-file.txt

local file to s3 bucket

When copying an S3 object to a local file, use the following syntax.

shell
aws s3 cp s3://bucket-name/my-file.txt my-file.txt

s3 object to local file

When copying an S3 object from one bucket to another use the following syntax.

shell
aws s3 cp s3://source-bucket/file.ext s3://destination-bucket/file.ext

s3 object to different bucket

For more examples on the aws s3 cp command, check out the examples section of the docs.

When using the 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.

# Further Reading

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.