What you will be able to do
- Enable private connectivity on AWS, Azure and Google Cloud with SYSTEM$AUTHORIZE_PRIVATELINK and verify it
- Diagnose the usual private connectivity failures: expired tokens, public DNS resolution and pending endpoints
- Restrict which buckets and containers stages can reach with STORAGE_ALLOWED_LOCATIONS and STORAGE_BLOCKED_LOCATIONS
1.What private connectivity changes
Private connectivity sends your traffic to Snowflake through a private IP address in your own network instead of over the public internet. Each cloud uses its own service: AWS PrivateLink, Azure Private Link or Google Cloud Private Service Connect. The one you use depends on which cloud hosts the Snowflake account. Private endpoints can carry traffic to the Snowflake service, Snowsight, Streamlit, internal stages, Snowflake-managed storage volumes and other features.
Private connectivity covers inbound traffic only. It carries connections from your network into Snowflake, and it does not route Snowflake's outbound calls to your private data sources. On its own, it also does not close the public path. That takes a network policy that allows the endpoint ID and blocks 0.0.0.0/0.
On every cloud, enabling private connectivity works the same way. An ACCOUNTADMIN calls SYSTEM$AUTHORIZE_PRIVATELINK with an identifier from the cloud and a short-lived token that proves control of it. SYSTEM$GET_PRIVATELINK, called with the same two arguments, confirms the result. SYSTEM$REVOKE_PRIVATELINK reverses it.
| Cloud | First argument | Token command | Token lifetime |
|---|---|---|---|
| AWS | aws_id (12-digit AWS account ID) | aws sts get-federation-token --name sam | 12 hours |
| Azure | private-endpoint-resource-id | az account get-access-token --subscription <SubscriptionID> | Not specified |
| Google Cloud | gcp_project_id | gcloud auth print-access-token | 1 hour by default |
Checkpoint 1 of 4· Check yourself
An ACCOUNTADMIN has run SYSTEM$AUTHORIZE_PRIVATELINK for the company's AWS account, and SYSTEM$GET_PRIVATELINK reports that the account is authorized. Security now requires that nobody can sign in to Snowflake over the public internet. What else is needed?
Private connectivity adds a private inbound path but does not close the public one. Private endpoint rules have no effect on public requests, so you also need an IPv4 rule for 0.0.0.0/0 in the blocked list, and the policy does nothing until it is activated. EGRESS rules control outbound traffic and are not used here.
“completely block requests from public IPv4 addresses, you must create two separate network rules, one for the allowed list and another for the blocked list.”Source: docs.snowflake.com
2.Enabling private connectivity on each cloud
On AWS, you authorize the AWS account, then build the endpoint. Run aws sts get-federation-token, take the 12-digit ID from FederatedUserId, and pass both to the authorize function as ACCOUNTADMIN. Next, call SYSTEM$GET_PRIVATELINK_CONFIG and create a VPC endpoint from its privatelink-vpce-id value. Then let the security group reach ports 443 and 80 of the VPCE CIDR. If the VPC is in a different region from the Snowflake account, choose cross-region endpoint options in the AWS console. Accounts from managed services or third-party vendors cannot use the self-service flow and must go through Snowflake Support.
On Azure, you create the endpoint first, and it waits for Snowflake's approval. Create a private endpoint, using the privatelink-pls-id value from SYSTEM$GET_PRIVATELINK_CONFIG as the resource ID or alias. The endpoint shows the connection state Pending. Then pass the endpoint's resource ID and the token from az account get-access-token to SYSTEM$AUTHORIZE_PRIVATELINK. The state changes to Approved. The Azure user who generates the token needs Read permission on the subscription.
On Google Cloud, you authorize a project. Generate a token with gcloud auth print-access-token and authorize the project ID from which endpoints will be created. Then reserve a virtual IP and create the forwarding rule. Private Service Connect endpoints are regional, and the limits are 10 connections per project and 50 per account.
USE ROLE ACCOUNTADMIN; SELECT SYSTEM$AUTHORIZE_PRIVATELINK ( 'my-gcp-project-id', 'ya29.a0AcM612zT4pJaXdYfwgY8aiMoDE9W_xkqQ20coFTB1TJcImKDPo...' );Internal stages need their own endpoint on every cloud. On Azure and Google Cloud, SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS authorizes the stage endpoint, and that function is not supported on AWS. On AWS, a VPC interface endpoint for internal stages keeps S3 traffic from Snowflake clients on the AWS backbone, and it is the recommended option. Once connectivity works, Snowflake also recommends pinning the private endpoints for the account.
Checkpoint 2 of 4· Put it in order
You are enabling Azure Private Link for a Snowflake account on Azure. Put these steps in the order the setup requires.
- 1.In the Azure portal, create a private endpoint using that value as the resource ID or alias; its connection state shows Pending
- 2.Call SYSTEM$AUTHORIZE_PRIVATELINK with the private endpoint's resource ID and the access token; the connection state changes to Approved
- 3.Generate an access token with az account get-access-token for your subscription ID, as a user with Read permission on the subscription
- 4.As ACCOUNTADMIN, run SYSTEM$GET_PRIVATELINK_CONFIG and record the privatelink-pls-id value
On Azure the endpoint comes first and waits in the Pending state. Snowflake approves it only when you authorize the endpoint's resource ID with a subscription token. This is the reverse of AWS, where you authorize the AWS account first and then build the VPC endpoint.
“the Private Endpoint displays a CONNECTION STATE value of Pending. This value will update to Approved after completing the authorization in the next step.”Source: docs.snowflake.com
3.Troubleshooting a private connection that will not work
Most failures fall into three groups: the token, DNS, or the endpoint's state. Work through them in that order.
Tokens expire quickly. An AWS federated token lasts 12 hours, and a Google Cloud access token lasts one hour by default. A call to authorize, verify or revoke made with an old token fails, so generate a fresh token and call again. When verification works, it returns Account is authorized for PrivateLink.
DNS is the most common silent failure. The values returned by SYSTEM$GET_PRIVATELINK_CONFIG must resolve to the endpoint: through CNAME records on AWS, or to the private endpoint's IP on Azure. Which values you need depends on the features you use. Outbound firewalls must allow the account URL and the OCSP URL. The OCSP host name format depends on the client version, so updating drivers can mean updating firewall rules as well.
USE ROLE ACCOUNTADMIN; SELECT key, value FROM TABLE(flatten(input=>parse_json(system$get_privatelink_config())));On Azure, an endpoint stuck at Pending means the Snowflake-side authorization has not been done. Once it shows Approved, test the path with SnowCD and SYSTEM$ALLOWLIST_PRIVATELINK. Azure Private Link carries IPv4 TCP traffic only, and the endpoint's network security group must allow ports 443 and 80.
Checkpoint 3 of 4· Check yourself
Two days after a team created an Azure private endpoint from the privatelink-pls-id value, the portal still shows its connection state as Pending. What fixes this?
If an Azure endpoint stays at Pending, the Snowflake-side authorization has not been done. It changes to Approved only after SYSTEM$AUTHORIZE_PRIVATELINK is called with the endpoint's resource ID and a subscription token. DNS, network policy rules and NSG ports only matter after approval.
“displays a CONNECTION STATE value of Pending. This value will update to Approved after completing the authorization in the next step.”Source: docs.snowflake.com
4.Storage integrations and allowed storage locations
A storage integration holds the cloud trust relationship, so stages never hold credentials. The integration stores an IAM entity that Snowflake generates. Your cloud administrators grant that entity permissions on the buckets or containers. Users then create stages and load or unload data without supplying keys. One integration can serve many external stages.
**STORAGE_ALLOWED_LOCATIONS limits which locations those stages can reach.** It takes a list of S3, GCS or Azure URLs, optionally with paths, and every stage's URL must match one of them. Paths are case-sensitive. The parameter also accepts the * wildcard, which allows every bucket the IAM entity can access. STORAGE_BLOCKED_LOCATIONS takes the same kind of list and prohibits those locations. It is usually combined with a wildcard allowed list: everything is allowed except the named sensitive buckets.
Two operational settings matter in an incident. Setting ENABLED = FALSE with ALTER STORAGE INTEGRATION stops users creating new stages on the integration, and existing stages lose access to their storage. That makes it a quick way to cut off every stage behind one trust relationship. The second setting is a restriction on cross-cloud use: if the storage is on a different cloud from the Snowflake account, it must be in the public cloud, not a virtual private environment.
Checkpoint 4 of 4· Check yourself
Your team's stages all use one storage integration with STORAGE_ALLOWED_LOCATIONS = ('*'). Security asks that no stage on it can ever read from the bucket s3://finance-raw/. Which control does this?
A network policy controls where inbound requests to the Snowflake service and internal stage come from. It does not control which external locations a stage can point at. That is set by the storage integration's allowed and blocked locations, so with a wildcard allowed list you name the sensitive bucket in STORAGE_BLOCKED_LOCATIONS. EGRESS rules are for UDFs and procedures that call out from Snowflake, and INTERNAL_STAGE rules restrict access to the AWS internal stage.
“You can use network policies to control inbound access to the Snowflake service and internal stage.”Source: docs.snowflake.com
Sources
(8)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“These connections use AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.”
↩︎ What private connectivity changes - 2.
“PrivateLink controls inbound connectivity from your network to Snowflake.”
↩︎ What private connectivity changes“Using the ACCOUNTADMIN Snowflake system role, call the SYSTEM$AUTHORIZE_PRIVATELINK function to authorize (enable) AWS PrivateLink for your Snowflake account”
↩︎ What private connectivity changes“call the SYSTEM$GET_PRIVATELINK_CONFIG function, and then record the privatelink-vpce-id value.”
↩︎ Enabling private connectivity on each cloud“authorize a security group of services that connect the Snowflake outgoing connection to port 443 and 80 of the VPCE CIDR”
↩︎ Enabling private connectivity on each cloud“The self-service enablement process in this section doesn’t currently support authorizing an AWS account identifier from a managed cloud service or a third-party vendor.”
↩︎ Enabling private connectivity on each cloud“This step is required for Amazon S3 traffic from Snowflake clients to stay on the AWS backbone.”
↩︎ Enabling private connectivity on each cloud“Snowflake recommends pinning private endpoints for your Snowflake account.”
↩︎ Enabling private connectivity on each cloud“The federated token expires after 12 hours.”
↩︎ Troubleshooting a private connection that will not work“SYSTEM$GET_PRIVATELINK returns Account is authorized for PrivateLink. for a successful authorization.”
↩︎ Troubleshooting a private connection that will not work“you must create Canonical Name (CNAME) records in your DNS to resolve the appropriate endpoint values from the SYSTEM$GET_PRIVATELINK_CONFIG function”
↩︎ Troubleshooting a private connection that will not work“Your DNS record must resolve to private IP addresses within your VPC.”
↩︎ Exam trap 1“If it resolves to public IP addresses, the record isn’t configured correctly.”
↩︎ Prediction - 3.
“In Snowflake, execute SYSTEM$GET_PRIVATELINK_CONFIG and input the value for privatelink-pls-id into the Resource ID or alias field.”
↩︎ Enabling private connectivity on each cloud“The user generating the Azure access Token must have Read permissions on the Subscription.”
↩︎ Enabling private connectivity on each cloud“Update your outbound firewall settings to allow the Snowflake account URL and OCSP URL.”
↩︎ Troubleshooting a private connection that will not work“On approval, the Private Endpoint displays a CONNECTION STATE value of Pending.”
↩︎ Troubleshooting a private connection that will not work“test your connection to Snowflake with SnowCD (Connectivity Diagnostic Tool) and SYSTEM$ALLOWLIST_PRIVATELINK.”
↩︎ Troubleshooting a private connection that will not work“the Private Endpoint displays a CONNECTION STATE value of Pending. This value will update to Approved after completing the authorization in the next step.”
↩︎ Checkpoint“displays a CONNECTION STATE value of Pending. This value will update to Approved after completing the authorization in the next step.”
↩︎ Checkpoint - 4.
“gcp_project_id is the Google Cloud Project ID from which you plan to create endpoints and connect to Snowflake securely.”
↩︎ Enabling private connectivity on each cloud“Maximum 10 connections per project.”
↩︎ Enabling private connectivity on each cloud“By default, the token expires after 1 hour.”
↩︎ Troubleshooting a private connection that will not work - 5.https://docs.snowflake.com/en/sql-reference/functions/system_authorize_stage_privatelink_accessOfficial docs
“This function is not supported for Snowflake accounts on Amazon Web Services (AWS).”
↩︎ Enabling private connectivity on each cloud - 6.
“A storage integration is a Snowflake object that stores a generated identity and access management (IAM) entity for your external cloud storage”
↩︎ Storage integrations and allowed storage locations“Cloud provider administrators in your organization grant permissions on the storage locations to the generated entity.”
↩︎ Storage integrations and allowed storage locations“Explicitly limits external stages that use the integration to reference one or more storage locations (i.e. S3 bucket, GCS bucket, or Azure container).”
↩︎ Storage integrations and allowed storage locations“The URL in the stage definition must align with the storage location specified for the STORAGE_ALLOWED_LOCATIONS parameter.”
↩︎ Storage integrations and allowed storage locations“Commonly used when STORAGE_ALLOWED_LOCATIONS is set to the * wildcard, allowing access to all buckets in your account except for blocked storage locations”
↩︎ Storage integrations and allowed storage locations“If you enclose the entire STORAGE_BLOCKED_LOCATIONS value in quotes, the value is invalid.”
↩︎ Storage integrations and allowed storage locations“the storage location must be in the public cloud and not a virtual private environment.”
↩︎ Storage integrations and allowed storage locations“the STORAGE_BLOCKED_LOCATIONS parameter setting is ignored when users create stages that reference the storage integration.”
↩︎ Exam trap 2 - 7.
“Existing stages that reference this integration cannot access the storage location in the stage definition.”
↩︎ Storage integrations and allowed storage locations
Also cited
“completely block requests from public IPv4 addresses, you must create two separate network rules, one for the allowed list and another for the blocked list.”
↩︎ Checkpoint“You can use network policies to control inbound access to the Snowflake service and internal stage.”
↩︎ Checkpoint