Source
AWS PrivateLink and Snowflake detailed troubleshooting Guide
Check the configuration of CNAME records in Route 53 (in your local DNS tool if Route 53 is not used) Note down the DNS name server from PrivateLink VPCE endpoint configuration.
A query using a correlated column inside a window function fails with internal error 300010:391167117
SOLUTION: To resolve this issue, avoid using correlated columns inside a window function. This can be achieved by moving the window aggregation function to the outer query.