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??
This will do the trick
glueContext._jsc.hadoopConfiguration().set("fs.s3.canned.acl", "BucketOwnerFullControl")
The scala version is as below:
glueContext.sparkContext.hadoopConfiguration.set("fs.s3.canned.acl", "BucketOwnerFullControl")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With