Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

289
Views
Write pyspark dataframe into s3 - An error occurred while calling o135.json

I have a DataFrame and I'd like to save the results as CSV inside my s3 directory called mydirectory : s3n://bucket/home/mydirectory/result.csv

In mydirectory I have the right to read and write.

However I have this error :

File "C:\Users\rubeno\Documents\spark-2.1.0-bin-hadoop2.7\python\lib\py4j-0.10.4-src.zip\py4j\protocol.py", line 319, in get_return_value
py4j.protocol.Py4JJavaError: An error occurred while calling o135.json.
: org.apache.hadoop.security.AccessControlException: Permission denied: s3n://bucket/home

Here is my code to write and save the df program_watched_by_set_of_box

program_watched_by_set_of_box.write.save(path='s3n://bucket/home/mydirectory/result.csv',
                         format='com.databricks.spark.csv',
                         header='false',
                         nullValue='null',
                         mode='overwrite')

Thx

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

check EMR configurations if fs.s3.enableServerSideEncryption is set to True. You can set below option with emr create-custer

--configurations '[{"Classification":"emrfs-site","Properties":{"fs.s3.enableServerSideEncryption":"true"},"Configurations":[]}]'
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!