简体   繁体   English

使用 AWS Glue 将 ACL 权限写入 S3 中的 write_dynamic_frame_from_options

[英]ACL permissions for write_dynamic_frame_from_options in to S3 using AWS Glue

How to add -acl permissions on s3 objects while trying to output Glue DynamicFrame using write_dynamic_frame_from_options .如何在尝试使用write_dynamic_frame_from_options output Glue DynamicFrame 时在 s3 对象上添加 -acl 权限。 I gave this line of code when i tried converting data and drop the csv files into another AWS account S3 bucket当我尝试转换数据并将 csv 文件放入另一个 AWS 帐户 S3 存储桶时,我给出了这行代码

glueContext.write_dynamic_frame.from_options(frame = DATA_temp, connection_type = "s3", connection_options = {"path": "s3://{BUCKETNAME}/{FOLDER1}/#0001"}, format = "csv")

My process finished successfully but i was unable to download or open files in that account??我的过程成功完成,但我无法下载或打开该帐户中的文件??

This will do the trick这会成功的

glueContext._jsc.hadoopConfiguration().set("fs.s3.canned.acl", "BucketOwnerFullControl")

The scala version is as below: scala版本如下:

glueContext.sparkContext.hadoopConfiguration.set("fs.s3.canned.acl", "BucketOwnerFullControl")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM