Generating Encrypted Key Pairs For Snowflake Accounts

Aaron Berry
4 min readJul 25, 2021

I recently had a requirement to produce some code that can generate encrypted PEM encoded RSA key pairs that can be used for snowflake key pair authentication for service accounts. I didn’t find a lot of clear documentation on what the best practice was to do this in a python environment, so ill share what I came up with that allows you to produce an RSA key pair with the following properties:

--

--

Aaron Berry

Software Engineer working in Data Engineer and DevOps. Tinkering with anything automation, containers and servers in the cloud.