I am trying to download files from S3 bucket I am using AWS CLI 2 and I am getting the following error. Not sure what "paths" is
aws s3 cp s3://my-bucket/my-folder --exclude "*" --include "*2020-06*" --recursive --profile mfa --region us-east-1
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: the following arguments are required: paths
In order to solve the "Following Arguments are Required - Paths" error, set the path argument in the call to aws s3 cp. When copying an S3 object to a local file, use the following syntax:
How to Recursively upload or download (copy) files with AWS S3 CP command When passed with the parameter --recursive the aws s3 cp command recursively copies all objects from source to destination. It can be used to download and upload large set of files from and to S3.
Setting the Access Control List (ACL) while copying an S3 object What is AWS S3 and S3API The AWS CLI provides two tiers of commands for accessing Amazon S3 The s3 tier consists of high-level commands that simplify performing common tasks, such as creating, manipulating, and deleting objects and buckets.
It enables you to carry out advanced operations that might not be possible with the following tier's high-level commands alone. The AWS CLI supports copying, moving, and syncing from Amazon S3 to Amazon S3 using the server-side COPY operation provided by Amazon S3.
The usage of aws s3 cp
is:
aws s3 cp <LocalPath> <S3Uri> or <S3Uri> <LocalPath> or <S3Uri> <S3Uri>
You need to specify your <LocalPath>
, it should be:
aws s3 cp s3://my-bucket/my-folder YOUR_LOCAL_PATH ...
Ref: https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With