Lluc
Lluc

Reputation: 79

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

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

Upvotes: 1

Views: 718

Answers (1)

Paolo
Paolo

Reputation: 26153

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

Upvotes: 1

Related Questions