cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Getting file permission issues even though I have the right IAM role attached

brickster_2018
Databricks Employee
Databricks Employee

I am reading data from S3 from a Databricks cluster and the read operation seldom fails with 403 permission errors. Restarting the cluster fixes my issue.

1 ACCEPTED SOLUTION

Accepted Solutions

brickster_2018
Databricks Employee
Databricks Employee

The main reason for this behavior is :

  • AWS keys are used in addition to the IAM role. Using global init scripts to set the AWS keys can cause this behavior.
  • The IAM role has the required permission to access the S3 data, but AWS keys are set in the Spark configuration. For example, setting spark.hadoop.fs.s3a.secret.key can conflict with the IAM role.
  • Setting AWS keys at the environment level on the driver node from an interactive cluster through a notebook.

View solution in original post

1 REPLY 1

brickster_2018
Databricks Employee
Databricks Employee

The main reason for this behavior is :

  • AWS keys are used in addition to the IAM role. Using global init scripts to set the AWS keys can cause this behavior.
  • The IAM role has the required permission to access the S3 data, but AWS keys are set in the Spark configuration. For example, setting spark.hadoop.fs.s3a.secret.key can conflict with the IAM role.
  • Setting AWS keys at the environment level on the driver node from an interactive cluster through a notebook.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group