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 27, 2018 in Cloud Computing by hemant
• 5,790 points
1,761 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,200 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
• 58,020 points
0 votes

You might try this:

aws s3 cp test.zip s3://my-bucket --recursive
answered Aug 30, 2018 by eatcodesleeprepeat
• 4,710 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,780 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,710 points
8,785 views
0 votes
1 answer

why aws s3 transfer acceleration is not working?

AWS S3 Transfer Acceleration enables fast, easy ...READ MORE

answered Feb 16, 2022 in Cloud Computing by anonymous
482 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,300 points
4,002 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
1,516 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,790 points
4,904 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
• 58,020 points
4,785 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,790 points
8,666 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,200 points
570 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,780 points
2,397 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
29,919 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP