有没有办法从 redshift 执行卸载语句并通过 jar 装 ACL bucket-owner-full-control
?
最佳答案
我最终得到了一个单独的 bash 脚本,它在 Redshift 创建的文件上添加了适当的 ACL。
S3_BUCKET="bla"
UNLOAD_FOLDER="path/to/bla"
for i in $(aws s3 ls s3://${S3_BUCKET}/${UNLOAD_FOLDER}/ --recursive | awk '{ print $4}');
do echo $i ;
aws s3api put-object-acl --bucket %s --region us-east-1 --key $i --acl bucket-owner-full-control;
done
done
关于amazon-s3 - Redshift Unload with Grant 或 Canned ACL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34322942/