Home > Net >  Parameter validation failed: Invalid bucket name in aws s3api put-object-acl
Parameter validation failed: Invalid bucket name in aws s3api put-object-acl

Time:09-06

I have tried to change the ACL configuration of a file in s3 through the command line, but it showed the error

Parameter validation failed:
Invalid bucket name

The problem is that the file I want to access has a structure such as follows:

data/folder1/folder2/folder3/file

I tried to access using the code

aws s3api put-object-acl --bucket s3://data/folder1/folder2/folder3/ --key file --acl public-read

How should I specify this?

Thank you very much! Lluc

CodePudding user response:

The bucket name doesn't need the s3:// prefix when using put-object-acl:

$ aws s3api put-object-acl --bucket flomics-public --key 'lluc/ext-controls/data/folder1/folder2/folder3/file' --acl public-read
  • Related