CertSafari
    Snowflake SnowPro Advanced: Security Engineer (SEA-C01)· Lessons

    Domain 1 · Lesson 4/21

    Egress paths from Snowflake: private connectivity, Data Connectivity Proxy and external functions

    Manage external access integrations.

    9 min read
    5.5% of exam
    7 sources
    Published 20 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Decide between the public internet and outbound private connectivity for external access, including the role, edition and cost requirements
    • Explain what Data Connectivity Proxy reaches that a cloud private endpoint cannot, and how an integration routes traffic to it
    • Compare an external function that uses an API integration and proxy service with a UDF that uses an external access integration, and pick the right one

    1.Public internet or outbound private connectivity

    When code in Snowflake calls an external endpoint, the traffic takes one of two network paths, and you choose the path before you create any objects. By default, a HOST_PORT egress rule sends traffic over the public internet. The alternative is outbound private connectivity, which uses the cloud providers' own links, described in Private connectivity (AWS PrivateLink, Azure Private Link, GCP Private Service Connect). Choose the private path when the security requirements for that connection rule out the public internet, for example when a UDF writes to a storage service and that traffic must stay off public networks.

    Private connectivity has three requirements that the public path does not, and exam scenarios test each one:

    • The person who configures it must have the ACCOUNTADMIN role.
    • The account must be Business Critical Edition or higher.
    • Private Link, PrivateLink or Private Service Connect adds a separate billing charge.

    The network rule changes too. Instead of HOST_PORT, it uses TYPE = PRIVATE_HOST_PORT. This path only works when the destination is a cloud service that offers a private endpoint, such as Amazon S3 or Azure Storage. A database in your own data centre has no such endpoint.

    Checkpoint 1 of 3· Check yourself

    A security engineer using the ACCOUNTADMIN role wants a UDF to write to Amazon S3 over AWS PrivateLink so the traffic stays off the public internet. The account is Enterprise Edition. The engineer has drafted an EGRESS network rule with TYPE = PRIVATE_HOST_PORT. What prevents this design from working as planned?

    Sources12

    2.Data Connectivity Proxy for sources without a private endpoint

    Data Connectivity Proxy (DCP) reverses the direction of the connection. You run a lightweight agent on a host inside your network. The agent makes one outbound connection on port 443 to Snowflake and keeps open an encrypted tunnel that Snowflake uses to reach the private source. Your firewall only sees outbound traffic: no inbound listener, no public IP and no VPN. The agent passes TCP traffic through without inspecting or storing it, and source credentials and connector logic stay in Snowflake. DCP is currently available for Snowflake Openflow.

    DCP uses the same integration object. You add a network rule with MODE = DATA_CONNECTIVITY_PROXY_EGRESS to an external access integration, then attach that integration to the DCP object with EXTERNAL_ACCESS_INTEGRATIONS on CREATE DATA CONNECTIVITY PROXY or ALTER DATA CONNECTIVITY PROXY. Routing depends on the destination: the relay finds the integration that covers the requested host and port and sends the connection through that agent.

    Choosing a private path to a data source
    CapabilityDCPPrivateLink / PSC / PEStable egress with IP allowlisting
    EditionsStandard, Enterprise, Business CriticalBusiness Critical and higher onlyStandard, Enterprise, Business Critical
    Inbound ports requiredNoneNoneRequired on your side
    Works across clouds and on-premisesYesCSP-native onlyYes
    Setup complexityLow (deploy agent, run bootstrap)High (VPC/VNet configuration, DNS, peering)Low (add IPs to firewall allowlist)

    Use outbound PrivateLink, PSC or Private Endpoint when the target is a cloud-native private endpoint and traffic must not cross the public internet. Use DCP when the source is on-premises, in another cloud, or anywhere without a cloud private endpoint, and inbound ports cannot be opened. Use stable egress IPs only when your firewall policy allows inbound rules based on IP addresses.

    Checkpoint 2 of 3· Check yourself

    An on-premises Oracle source will be reached through a Data Connectivity Proxy agent that is already running. Which Snowflake configuration tells the relay to send connections for that host and port through the agent?

    Sources31

    3.External functions and API integrations compared

    An external function is an older, separate way for SQL to call outside code, and it has a different trust chain. The function object holds no code. It stores the URL of an HTTPS proxy service, such as Amazon API Gateway or Azure API Management. Snowflake never calls the remote service directly: it POSTs JSON batches to the proxy, and the proxy forwards them to the remote service, such as an AWS Lambda or Azure Function, and passes the results back. The proxy can add security by authenticating requests to the remote service.

    The API integration holds the security information Snowflake needs to work with the proxy or remote service. Creating one requires ACCOUNTADMIN or a role with CREATE INTEGRATION. The author of an external function needs USAGE on the API integration. If the gateway needs a subscription key, API_KEY on CREATE or ALTER API INTEGRATION supplies it. The key is optional, works alongside IAM rather than replacing it, and is hidden from query history and DESCRIBE INTEGRATION output. An external function can also read a secret to put credentials into an API authorization header. In that case the roles that create and call the function need USAGE on the secret.

    External access integration compared with an external function
    AspectUDF or procedure with an external access integrationExternal function with an API integration
    Where the logic runsHandler code (for example Python or Java) inside SnowflakeA remote service outside Snowflake, reached through a proxy service
    Infrastructure you buildNetwork rule, secret, integrationRemote service, proxy service, API integration
    Where credentials liveA secret allowed by the integrationAuthentication information in the API integration, optional API_KEY, or a secret
    Privilege to author the functionUSAGE on the integration, READ on the secretUSAGE on the API integration

    Each approach fits a different situation. Suppose the logic is a short Python transformation plus a call to a REST API that uses OAuth, and no proxy service exists yet. A Python UDF with an external access integration and an OAUTH2 secret does the job, and there is no gateway to build or secure. An external function makes sense when the remote code is in a language a UDF cannot use, such as Go or C#, when it needs third-party libraries that internal UDFs cannot access, or when other software already calls the same service through the same interface.

    Checkpoint 3 of 3· Check yourself

    Your team's Amazon API Gateway fronts a remote service for an external function, and the gateway now requires every caller to send a subscription key. The API integration already authenticates to AWS through IAM. What is the correct way to supply the key?

    Sources456

    Practise it for real

    Build an external access path to an approved API, show that the allowlist blocks anything else, then disable the path as if containing an incident.

    1. 1.Create an egress rule: CREATE NETWORK RULE ... MODE = EGRESS TYPE = HOST_PORT VALUE_LIST = ('api.example.com:443').

      Why: The rule is the allowlist. Only the host and port listed here can be reached.

      You should see: The rule exists in the schema. Creating it needs CREATE NETWORK RULE on that schema.

    2. 2.Create a GENERIC_STRING secret that holds the API key, then CREATE EXTERNAL ACCESS INTEGRATION with ALLOWED_NETWORK_RULES = (your rule), ALLOWED_AUTHENTICATION_SECRETS = (your secret) and ENABLED = TRUE.

      Why: The integration combines the approved destination and the approved credential.

      You should see: The integration is created. Your role needs CREATE INTEGRATION on the account and USAGE on the secret and its schema.

    3. 3.Create a Python UDF with EXTERNAL_ACCESS_INTEGRATIONS = (your integration) and SECRETS = ('cred' = your secret), and read the key with get_generic_secret_string('cred').

      Why: The SECRETS alias binds a secret the integration allows, so the key never appears as a literal in code.

      You should see: The UDF calls api.example.com successfully.

    4. 4.Change the handler to call a host that is not in the rule, and run it.

      Why: Shows that the allowlist is enforced.

      You should see: The request is denied. A Deny row for the query appears in ACCOUNT_USAGE.EXTERNAL_ACCESS_HISTORY, possibly up to 180 minutes later.

    5. 5.Run ALTER EXTERNAL ACCESS INTEGRATION ... SET ENABLED = FALSE, then call the original UDF again.

      Why: Practises containing an incident without dropping any objects.

      You should see: The UDF can no longer reach api.example.com, and the function, rule and secret all still exist.

    Stuck? Get a nudge

    If the first call fails even though the host looks right, check whether the endpoint uses a port other than 443 and whether that port is written into the VALUE_LIST entry.

    Sources

    (7)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “You might use private connectivity based on the security requirements of your connection to the external network location.”
      ↩︎ Public internet or outbound private connectivity
      “If you use private connectivity, the person configuring the interaction must have been assigned the ACCOUNTADMIN role.”
      ↩︎ Public internet or outbound private connectivity
      “Using Azure Private Link, AWS PrivateLink, or Google Cloud Private Service Connect incurs an additional billing charge.”
      ↩︎ Public internet or outbound private connectivity
      “include a network rule with MODE = DATA_CONNECTIVITY_PROXY_EGRESS in the integration”
      ↩︎ Data Connectivity Proxy for sources without a private endpoint
      “In addition, your Snowflake account must be Business Critical Edition (or higher).”
      ↩︎ Exam trap 1
      “include a network rule with MODE = DATA_CONNECTIVITY_PROXY_EGRESS in the integration, then associate the integration with the DCP object by using EXTERNAL_ACCESS_INTEGRATIONS”
      ↩︎ Checkpoint
    2. 2.
      “The source is a cloud service that offers a private endpoint, such as Amazon S3 or Azure Storage.”
      ↩︎ Public internet or outbound private connectivity
    3. 3.
      “The agent makes a single outbound connection on port 443 to Snowflake and establishes an encrypted tunnel.”
      ↩︎ Data Connectivity Proxy for sources without a private endpoint
      “Source credentials and connector logic remain entirely within Snowflake.”
      ↩︎ Data Connectivity Proxy for sources without a private endpoint
      “DCP is currently available for use with Snowflake Openflow.”
      ↩︎ Data Connectivity Proxy for sources without a private endpoint
      “without requiring you to open inbound firewall ports or expose your network to the public internet.”
      ↩︎ Prediction
    4. 4.
      “The proxy service can increase security by authenticating requests to the remote service.”
      ↩︎ External functions and API integrations compared
      “An API integration stores information, such as security information, that is needed to work with a proxy service or remote service.”
      ↩︎ External functions and API integrations compared
      “The code for the remote service can be written in languages that other UDFs cannot be written in”
      ↩︎ External functions and API integrations compared
      “Snowflake does not call a remote service directly.”
      ↩︎ Exam trap 2
    5. 5.
      “Because an external function requires an API integration, the author of the external function must be granted USAGE privilege on the API integration.”
      ↩︎ External functions and API integrations compared
      “To create an API integration, you need ACCOUNTADMIN privileges or a Snowflake role with the CREATE INTEGRATION privilege.”
      ↩︎ External functions and API integrations compared
      “An API_KEY is in addition to, not a substitute for, IAM (Identity and Access Management).”
      ↩︎ External functions and API integrations compared
    6. 6.
      “For example, an external function needs to access and read the secret to pass the authentication credentials into an API authorization header”
      ↩︎ External functions and API integrations compared

    Also cited

    Ready to test yourself?

    Practise the 20 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.