Solve - the Following Arguments are Required - Paths Error

avatar

Borislav Hadzhiev

Wed Sep 15 20211 min read

banner

Photo by Daniel Vogel

Solving the Following Arguments are Required - Paths #

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

In order 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 #

Add me on LinkedIn

I'm a Web Developer with TypeScript, React.js, Node.js and AWS experience.

Let's connect on LinkedIn

Join my newsletter

I'll send you 1 email a week with links to all of the articles I've written that week

Buy Me A Coffee