2014-05-07 41 views

回答

0

對於帳戶中的所有桶,這應該這樣做:

buckets=$(aws s3api list-buckets --query="Buckets[*].Name" --output=text) 
for b in $buckets 
do 
    echo "Adding List to AuthUsers on $b" 
    aws s3api put-bucket-acl \ 
    --bucket $b \ 
    --grant-read 'uri="http://acs.amazonaws.com/groups/global/AuthenticatedUsers"' 
done 

調整過濾器和權限,以你的情況,不作任何保證:)

更多S3 API命令,請參閱:http://docs.aws.amazon.com/cli/latest/reference/s3api/index.html