python-3.x - 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
. I gave this line of code when i tried converting data and drop the csv files into another AWS account S3 bucket
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??
解决方案
这会成功的
glueContext._jsc.hadoopConfiguration().set("fs.s3.canned.acl", "BucketOwnerFullControl")
scala版本如下:
glueContext.sparkContext.hadoopConfiguration.set("fs.s3.canned.acl", "BucketOwnerFullControl")
推荐阅读
- php - 使用自定义表单撰写和上传新文章
- node.js - Node.js 和 PostgresSQL 与 Express(插入查询)
- android - 使用 android 从基于火的实时数据库接收特定数据
- javascript - 使用 AJAX 和 HTTP 请求实现搜索栏功能 - JavaScript
- asp.net-core - aspnet core 2.1中AddSignalR和AddSignalRCore扩展方法的区别
- xml - XML 中的元素发现无效内容
- python - 如何将python代码的输出重定向到文件
- c# - 替换整个或部分字符串
- html - UIKit:按钮没有出现
- spring - 当我有一个请求和多个返回时,如何将我的代码更改为 Spring Boot?