Module 17 · Lesson 10 of 12Detailed study · about 40 min

Snowflake Network Policies, Network Rules and Private Connectivity

Separate inbound network rules and network policies from DNS and private connectivity. Compare AWS PrivateLink, Azure Private Link and Google Cloud Private Service Connect.

Control where the connection comes from

Maple Market’s automated load should connect from an approved runtime network. A valid identity can still be rejected if its network origin is outside policy. Start with the actual address or endpoint Snowflake will see, which can differ from the workstation address because of managed networks or gateways.

A network rule names network identifiers such as IPv4 ranges or private endpoint identifiers. A network policy uses allowed and blocked entries and needs to be applied to a supported scope to take effect. For overlapping allow and block entries of the same kind, blocked entries take precedence. Private endpoint rule evaluation can differ from IP rule evaluation. Read the matching provider’s policy rules before combining them.

A network policy can apply at account level, user level or to a supported security integration. The effective scope depends on the connection flow and the applicable precedence rules. Test via the same identity, client, and network as the workload. Use the existing approved recovery route and avoid broadening a production policy for a test.

Verify the endpoint and the policy separately

A private endpoint gives the client a private network path to the Snowflake service. The cloud provider, routing, the Snowflake account and DNS must agree about that path. Snowflake service private connectivity requires Business Critical Edition or higher for these three providers. Coordinate provider and region availability with the platform team.

Maple Market asks the platform team to verify DNS resolves to the expected private route and the connector targets the correct account hostname. Then the security owner checks the approved network policy and the workload signs in with its normal strong method. Test both the allowed connection and the expected denial from a designated test location.

Connection to the Snowflake service and access to an internal or external stage can travel through different endpoints. Review stage-specific requirements before assuming a SQL sign-in proves file-transfer connectivity.

Snowflake service private connectivity by provider
ProviderPrivate connectivity offeringInbound private rule identifier
AWSAWS PrivateLinkAWSVPCEID
Microsoft AzureAzure Private LinkAZURELINKID
Google CloudPrivate Service ConnectGCPPSCID
Keep network reachability and access policy distinct The approved client reaches Snowflake through DNS and its private endpoint. The account applies the connection controls and still checks the user and the requested permission.
  1. Approved workload networkResolve and connect to Private DNS and endpoint
  2. Private DNS and endpointPresent network origin to Snowflake connection controls
  3. Snowflake connection controlsContinue on approved path to Identity and role checks

Build and verify an inbound network policy

The public IP Snowflake sees usually belongs to the network gateway. It may differ from the workstation’s private address. A Classless Inter-Domain Routing (CIDR) prefix lets you describe a range. Start with the verified egress IP of a dedicated pilot connection. A /32 IPv4 range names just one address.

Use a disposable account or a designated user with no existing user-level network policy, a known-good strong login, a permitted source, an approved second test source and a separate unaffected recovery administrator. Record the account baseline. In general the applicable integration policy overrides user policy, which overrides account policy. Snowflake OAuth treats the browser login and client token exchange separately. Check the flow before testing.

Name the allowed origin and attach it to only the pilot

A delegated schema role needs CREATE NETWORK RULE and parent access. TYPE selects the identifier format. MODE INGRESS means requests into Snowflake. A policy author with CREATE NETWORK POLICY creates the account-level object. Fully qualify the network rule name in its list.

The role applying the policy needs ownership of the user and USAGE on the policy, or equivalent higher authority. DESCRIBE shows the definition. POLICY_REFERENCES should show the user assignment. Substitute the verified IPv4 CIDR and exact sandbox names. Documentation-only IP ranges are for reading examples.

SQL · configuration template
CREATE NETWORK RULE <POLICY_DB>.<POLICY_SCHEMA>.M17D_APPROVED_IP
  TYPE = IPV4 MODE = INGRESS VALUE_LIST = ('<verified_pilot_ipv4>/32');

CREATE NETWORK POLICY M17D_PILOT_NET
  ALLOWED_NETWORK_RULE_LIST = ('<POLICY_DB>.<POLICY_SCHEMA>.M17D_APPROVED_IP');
DESCRIBE NETWORK RULE <POLICY_DB>.<POLICY_SCHEMA>.M17D_APPROVED_IP;
DESCRIBE NETWORK POLICY M17D_PILOT_NET;

ALTER USER <PILOT_USER> SET NETWORK_POLICY = M17D_PILOT_NET;
SELECT * FROM TABLE(<POLICY_DB>.INFORMATION_SCHEMA.POLICY_REFERENCES(
  POLICY_NAME => 'M17D_PILOT_NET', POLICY_KIND => 'NETWORK_POLICY'
));

Test the two origins and restore the prior policy

From the allowed origin, start a fresh session as the pilot with the approved authentication method. Expect the pilot user and intended role from SELECT CURRENT_USER(), CURRENT_ROLE(). From the other approved test source use the same client and identity in a new session. Expect a network rejection. Compare timestamps and the redacted client or login evidence.

If both work, check whether both egress through the same address or a more specific integration policy applied. If both fail, verify the egress IP, rule type, effective policy and DNS. A block entry wins on overlapping identifiers evaluated together. Check precedence when private endpoint and IP rules are mixed. The recovery administrator can remove the test assignment, then the owner drops the dedicated policy and rule.

SQL · configuration template
ALTER USER <PILOT_USER> UNSET NETWORK_POLICY;
DROP NETWORK POLICY M17D_PILOT_NET;
DROP NETWORK RULE <POLICY_DB>.<POLICY_SCHEMA>.M17D_APPROVED_IP;

PrivateLink changes the route. An interface endpoint creates private network interfaces inside the virtual private cloud (VPC). Domain Name System (DNS) records direct the Snowflake hostname to those interfaces. The security group controls which client subnets can reach the endpoint. Snowflake still verifies its user and SQL permissions.

Use an approved Snowflake AWS account with Business Critical Edition or higher, a supported AWS region, and cloud and Snowflake administrators. The endpoint can incur AWS charges. Keep the existing approved path available until the platform and security teams have separate evidence for route, policy, sign-in and each workload.

For supported self-service AWS accounts, the AWS owner follows Snowflake’s AWS PrivateLink authorization steps. Obtain the short-lived AWS STS federation response and extract its AWS account ID. Hand the response directly to the authorized Snowflake administrator through the approved secret workflow. Never publish it or use a shared worksheet. Managed cloud and third-party accounts can require Snowflake Support.

Snowflake ACCOUNTADMIN authorizes PrivateLink once and records the service name from privatelink-vpce-id and the private account and OCSP URLs. The service name is used to create the AWS endpoint. It differs from the actual vpce identifier assigned to the endpoint after creation.

SQL · configuration template
USE ROLE ACCOUNTADMIN;
-- Run only when the approved account still requires self-service authorization.
SELECT SYSTEM$AUTHORIZE_PRIVATELINK('<aws_account_id>', '<approved_federation_response>');
SELECT SYSTEM$GET_PRIVATELINK_CONFIG();
SELECT SYSTEM$ALLOWLIST_PRIVATELINK();

In AWS VPC, create an interface endpoint using the service name from the returned configuration. Select the correct VPC and approved subnets, and set the security group to allow TCP 443 from the pilot clients and TCP 80 for the documented OCSP cache route. Use least scope. Wait for the endpoint to become Available and record its actual vpce ID and DNS name.

In Route 53 or the existing private resolver, add CNAME records for the Snowflake private account host and Online Certificate Status Protocol (OCSP) cache host from the configuration, pointing to the endpoint DNS name. Configure the approved Snowflake client to use the private hostname, while preserving the normal credentials and TLS validation. Run the checks from the workload subnet. Expect private resolution, a successful client connection and the intended user and role.

Shell · configuration template
nslookup <private_snowflake_host>
nslookup <private_ocsp_host>
snow connection test --connection <approved_private_profile>
snow sql --connection <approved_private_profile> -q 'SELECT CURRENT_USER(), CURRENT_ROLE()'

Use the actual client endpoint ID in the AWSVPCEID rule. Create a separate pilot policy and apply it only to the verified pilot user after confirming its baseline. Test a fresh login from the allowed endpoint and from the designated public or alternate endpoint path. Expect one successful sign-in and one network rejection. Verify separate stage traffic if the workload uploads files.

Use the same rollback pattern as the IP pilot. Remove the test assignment before dropping its policy and rule. If the endpoint was solely for this lab, have the cloud owner remove the pilot CNAME records and endpoint after confirming no consumers rely on them. Coordinate any account-level PrivateLink retirement with the authorized platform owner.

SQL · configuration template
CREATE NETWORK RULE <POLICY_DB>.<POLICY_SCHEMA>.M17D_AWS_ORIGIN
  TYPE = AWSVPCEID MODE = INGRESS VALUE_LIST = ('<actual_client_vpce_id>');
CREATE NETWORK POLICY M17D_PRIVATE_NET
  ALLOWED_NETWORK_RULE_LIST = ('<POLICY_DB>.<POLICY_SCHEMA>.M17D_AWS_ORIGIN');
ALTER USER <PILOT_USER> SET NETWORK_POLICY = M17D_PRIVATE_NET;
DESCRIBE NETWORK POLICY M17D_PRIVATE_NET;
-- After the isolated tests, restore the baseline.
ALTER USER <PILOT_USER> UNSET NETWORK_POLICY;
DROP NETWORK POLICY M17D_PRIVATE_NET;
DROP NETWORK RULE <POLICY_DB>.<POLICY_SCHEMA>.M17D_AWS_ORIGIN;

Troubleshoot the route and policy independently

A hostname resolving to a public address usually points to the client hostname or DNS zone. A private address with a connection timeout points to endpoint availability, routing or the security group. If connectivity succeeds and login is denied, review the endpoint identifier, effective policy and authentication event. Avoid changing three controls at once.

Azure and Google Cloud need their own endpoint authorization and DNS setup. Use the authorized Azure LinkID for AZURELINKID. Use the Google Cloud pscConnectionID for GCPPSCID. The display name or subnet ID is not interchangeable with either. An ingress rule for the private Snowflake service by itself does not verify an internal-stage route.

Explain the design in an interview

Name the rule, then explain how you would prove it.

Does PrivateLink replace a network policy?

PrivateLink gives the client a private route. I would still use the approved inbound policy to restrict the origins and verify sign-in and role privileges separately.

Why did a rule for an AWS service name fail?

The service name is what I use to create the endpoint. To allow a specific client endpoint in Snowflake I use that endpoint’s assigned vpce identifier.

How would you test a future network rollout?

I would pilot a user on the real client path, retain a strong recovery route and check the scheduled jobs and stage traffic separately before changing the account baseline.

Words used in this lesson
Network rule
Named set of network identifiers with an intended direction or use.
Network policy
An inbound connection control applied at a supported scope.
Private connectivity
A cloud private endpoint path to a service.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 2

Snowflake Network Policies, Network Rules and Private Connectivity

Client
Expected DNS
Approved endpoint

Verify where the request travels

Confirm the account hostname and the intended DNS and private route.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Verify where the request travels

    Confirm the account hostname and the intended DNS and private route.

    Client → Expected DNS → Approved endpoint

  2. Check policy and identity

    Inspect the connection scope, then verify the sign-in and intended SQL operation.

    Network policy → Authentication → Role privileges

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Check the Snowflake connection after testing the route

SQL · runnable example
SELECT CURRENT_ACCOUNT_NAME() AS account_name,
       CURRENT_USER() AS connected_user,
       CURRENT_ROLE() AS active_role;

What to expect and why

Expect the approved pilot account, user and role on the allowed path. This SQL proves a session is usable. Keep the DNS and policy evidence alongside it because the session context alone does not identify the network route.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

What does a private endpoint establish?

Try it yourself

A private endpoint resolves correctly but file loading fails. What should you check?

Compare your reasoning

Check the stage type, data path and its applicable network controls, then verify the stage and load privileges through the actual client.

Official sources and curriculum

Module 17 · See module scope

By Rohit Ray · Independent educational lesson · Explore this visual lab