Prerequisites
Generate a private and public key in Snowflake and configure your Snowflake user, following the procedure given in the Snowflake documentation.Video example
Storing the private key
If you are running in a Hybrid SaaS deployment model, you must store the private key as a secret within your own infrastructure, in either an AWS Secrets Manager or an Azure Key Vault. Follow the procedure in the appropriate section below. If you are running in a Full SaaS deployment model, you must copy the private key into the Private key field when you create your Environment. Copy the full content of the Snowflake private key file you generated, including the header and footer lines. In a Full SaaS deployment model, your encrypted private key, including the header and footer, should look like this:--- END ENCRYPTED PRIVATE KEY --- to avoid connection or JSON Web Token (JWT) errors.
An unencrypted private key, including the header and footer, should look like this:
--- END PRIVATE KEY --- to avoid connection or JSON Web Token (JWT) errors.
If your private key has been shared, the format may have been altered. To correct this, run the following command to validate and convert the key to the correct format:
AWS Secrets Manager
- Log in to the AWS account that houses your .
- Browse to the Secrets Manager service.
- Ensure you’re in the same AWS region as your .
- Click Store a new secret.
- Click Other type of secret.
- Click the Plaintext tab.
- Copy the full content, including header and footer, of the Snowflake private key file you generated.
- The private key must be stored as a plaintext secret.
- You must add a new AWS secret for every private key you want to use.
- Ensure that the has permissions to use the new secret by giving the ‘s IAM task role permissions to use the new secret. Read AWS IAM roles for details.

