• Linux
  • FreeBSD
  • Networking
  • Python
  • AWS
  • WebDev
  • About Us

AWS S3 error while uploading a folder : upload failed Parameter validation failed:

Written by
AWS Leave a Comment

So when I try to upload a folder with lots of files , I started getting the above error . I am using the aws cli command to copy the files to the s3 bucket

aws s3 cp /home/ubuntu/backups/ s3://yourbucketname/

Full error:

upload failed: backups/ to s3://yourbucketname/ Parameter validation failed:
Invalid length for parameter Key, value: 0, valid range: 1-inf

so you need to add a recursive flag along with command :

aws s3 cp --recursive /home/ubuntu/backups/ s3://yourbucketname/

This will clean that error and you can verify the upload from your S3 side

© Copyright 2020.TechieNix. All Rights Reserved.