title: Password less login in snowflake from pyspark
body: <p>I am new to snowflake. I am creating an ETL job where we need to access the snowflake database.</p>
  
  <p>I am trying to connect to snowflake from two places. One from the ec2 instance using a shell script and other from pyspark in aws glue. 
  When I am trying to connect from a shell script, I am keeping my password in the config file and when I am trying to connect from pyspark, I have to give my password as below</p>
  
  <p>sfOptions = {
    "sfURL" : 'xxx',
    "sfAccount" : 'xxx',
    "sfUser" : 'xxx',
    "sfPassword" : 'xxx',
    "sfDatabase" : 'xxx',
    "sfSchema" : 'xxx'
  }</p>
  
  <p>But I don't want to give a password like this as it is not safe. I want passwordless login or key pair authentication login from both shell script and pyspark. I did find one doc here 
  <a href="https://docs.snowflake.net/manuals/user-guide/snowsql-start.html#using-key-pair-authentication" rel="nofollow noreferrer">https://docs.snowflake.net/manuals/user-guide/snowsql-start.html#using-key-pair-authentication</a></p>
  
  <p>But I don't know whether it will work in pyspark and shell script. and if it works, then how to pass the password in sfOption shown above. Basically, I don't want to give "sfPassword" : 'xxx' in the above connection.</p>