Quick debug: AWS S3 Invalid length for parameter Key

You’re here (hopefully) because you were trying to run the aws s3 cp command but got the error:

Parameter validation failed:
Invalid length for parameter Key, value: 0, valid range: 1-infLet’s cut to the chase.

Are you trying to upload a whole directory (e.g. the current directory)to your bucket ? A little bit like so:

aws s3 cp . s3://bucket-name

Then what you need to do is add the --recursive flag, like so:

aws s3 cp . s3://bucket-name…

--

--

Technical Instructor and Software Engineer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store