Skip to content

What's the best way to set credentials securely? Is there a way to pass variables to the %%configure cell? #819

Answered by flowy0
flowy0 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, managed to fix this issue by using the command below instead.

spark.sparkContext._jsc.hadoopConfiguration().set("fs.s3a.access.key", AWS_ACCESS_KEY_ID)
spark.sparkContext._jsc.hadoopConfiguration().set("fs.s3a.secret.key", AWS_SECRET_ACCESS_KEY)

Check Config is applied

spark._jsc.hadoopConfiguration().get('fs.s3a.access.key')

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@flowy0
Comment options

Answer selected by devstein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants