AWS S3 cli isn’t working on Windows server

+4 votes

 There is no problem running it on my Linux box, but when it comes to windows server 12 simple AWS S3 cli commands refuse to work.

When I tried running a simple copy command to a bucket. I got the following error:

Parameter validation failed:

Invalid length for parameter Key, value: 0, valid range: 1-inf

I had trouble understanding the error in first place. How do I deal with it?

Here's the command:

aws s3 cp test.zip s3://my-bucket

Following is the version:

aws-cli/1.11.158 Python/2.7.9 Windows/2012Server botocore/1.7.16
Mar 26, 2018 in Cloud Computing by hemant
• 5,750 points
171 views

4 answers to this question.

+1 vote

Following is the error message:

Invalid length for parameter Key

As per the error message you should specify a Key for your object (a filename basically). Consider this:

aws s3 cp test.zip s3://my-bucket/test.zip
answered Mar 27, 2018 by brat_1
• 7,080 points
+1 vote

The error message has nothing to do with specifying the file name on the destination file path (that will be taken from the origin). It has everything to do with having a valid access key and secret key setup.

Run the following command to verify if you have configured your credentials.

aws configure list
answered Aug 20, 2018 by Priyaj
• 56,940 points
0 votes

You might try this:

aws s3 cp test.zip s3://my-bucket --recursive
answered Aug 30, 2018 by eatcodesleeprepeat
• 4,670 points
0 votes

The error message:

Invalid length for parameter Key

This message occurs because you need to specify a Key for your object (a filename basically). Similar to this:-

aws s3 cp test.zip s3://my-bucket/test.zip
answered Oct 11, 2018 by findingbugs
• 4,750 points

Related Questions In Cloud Computing

+1 vote
2 answers

AWS: s3 file downloads not working in Chrome specifically

The canonical Internet media type for a PDF document ...READ MORE

answered Sep 4, 2018 in Cloud Computing by eatcodesleeprepeat
• 4,670 points
797 views
+4 votes
2 answers

How come AWS S3 is erasing my extension from PDF files?

I think the problem should be with ...READ MORE

answered Mar 27, 2018 in Cloud Computing by code_ninja
• 6,220 points
145 views
+4 votes
3 answers

AWS S3 pricing - data transfer in/out

All traffic FROM mobile phones to S3 ...READ MORE

answered Oct 16, 2018 in Cloud Computing by anish
93 views
+3 votes
5 answers

AWS EFS vs EBS vs S3 (differences & when to use?)

EFS is: May not yet be available in ...READ MORE

answered Apr 9, 2018 in Cloud Computing by hemant
• 5,750 points
1,561 views
+2 votes
3 answers

AWS S3 copy files and folders between two buckets

A simplified example using the aws-sdk gem: AWS.config(:access_key_id ...READ MORE

answered Aug 16, 2018 in Cloud Computing by Priyaj
• 56,940 points
809 views
+2 votes
2 answers

Is there a way to add cache control in AWS S3?

use of  current upstream master branch will ...READ MORE

answered Apr 10, 2018 in Cloud Computing by hemant
• 5,750 points
1,214 views
+1 vote
1 answer

Connecting to a DB on another server

It should’nt be a problem. The server ...READ MORE

answered Apr 11, 2018 in Cloud Computing by brat_1
• 7,080 points
40 views
0 votes
1 answer

Is there a way to transfer files between AWS s3 and ec2

The answer is a definite yes yes. ...READ MORE

answered Apr 17, 2018 in Cloud Computing by brat_1
• 7,080 points
64 views
+3 votes
3 answers

Is there a way to install apache drill on an EMR cluster on AWS that is already Running?

It looks to be trying to get ...READ MORE

answered Oct 11, 2018 in Cloud Computing by findingbugs
• 4,750 points
338 views
+3 votes
6 answers

Are the S3 buckets in AWS, Region Specific?

Yes S3 buckets are region specific. When you ...READ MORE

answered Oct 16, 2018 in Cloud Computing by Rijo
2,206 views