Use the serverless runtime environment with key pair authentication
You can use a serverless runtime environment hosted on AWS or Azure to connect to Snowflake with key pair authentication.
Before you configure a Snowflake connection using the serverless runtime environment, perform the following tasks:
•Add the private key file path and file name in the Amazon S3 bucket or Azure container in your AWS or Azure account.
•Configure the .yml serverless configuration file.
•Configure the connection properties to connect to Snowflake.
Add the private key file path and file name in the Amazon S3 bucket or Azure container in your AWS or Azure account
Perform the following steps to configure a Snowflake connection in a serverless runtime environment:
1Create the following structure for the serverless agent configuration in AWS or Azure: <Supplementary file location>/serverless_agent_config
2Add the path to the private key file, including the private key file name, in the Amazon S3 bucket or Azure container in the following location in your AWS or Azure account: <Supplementary file location>/serverless_agent_config/SSL
Configure the .yml serverless configuration file
Perform the following steps to configure the .yml serverless configuration file in the serverless runtime environment, and to copy the private key file path and file name entries to the serverless agent directory:
1Copy the following code snippet to a text editor:
where the source path is the directory path of the private key file in AWS or Azure.
2Ensure that the syntax and indentations are valid, and then save the file as serverlessUserAgentConfig.yml in the following AWS or Azure location: <Supplementary file location>/serverless_agent_config
When the .yml file runs, the private key file is copied from the AWS or Azure location to the serverless agent directory.
Configure the connection properties to connect to Snowflake
Specify the path to the private key file, including the private key file name in the Private Key File field in the Snowflake Data Cloud connection.
For example, /home/cldagnt/SystemAgent/serverless/configurations/ssl_store/<Private key file name>