You are tasked with training a complex machine learning model using scikit-learn and need to leverage Snowflake's data for training outside of Snowflake using an external function. The training data resides in a Snowflake table named 'CUSTOMER DATA'. Due to data governance policies, you must ensure minimal data movement and secure communication. You choose to implement the external function using AWS Lambda'. Which of the following steps are crucial to achieve secure and efficient model training outside of Snowflake?
Correct Answer: A,B,D
Options A, B, and D are correct. An API integration is essential for securely communicating with the external function via API Gateway, offering authentication and authorization. Granting usage privileges ensures only authorized roles can execute the external function. The external function serves as the bridge between Snowflake and the external service. Option C is incorrect because storing Snowflake credentials directly in Lambda environment variables is a security risk. Option E, while good practice, is not strictly related to the external function configuration for training model.