in customer-stack/create-resources.py [0:0]
def get_storage_integration_info_for_policy(snowflake_cursor, storage_integration_name):
logger.info("Describing Storage Integration")
storage_user_arn = ''
storage_external_id = ''
snowflake_cursor.execute(("describe integration \"%s\"") % (storage_integration_name))
rows = snowflake_cursor.fetchall()
for row in rows:
value = list(row)
if (value[0] == "STORAGE_AWS_IAM_USER_ARN"):
storage_user_arn = value[2]
if (value[0] == "STORAGE_AWS_EXTERNAL_ID"):
storage_external_id = value[2]
return {
SERVICE: "sagemaker.amazonaws.com",
USER_ARN: storage_user_arn,
EXTERNAL_ID: storage_external_id
}