Snowpark Container Services costs

The costs associated with using Snowpark Container Services can be categorized into storage cost, compute pool cost, and data transfer cost.

What you pay for

The following table summarizes the resources that Snowpark Container Services bills for. For the rate of each resource, see the Snowflake Service Consumption Table.

ResourceBilling basisWhere it appears
Compute pool nodesCredits per node, based on the instance family. Charged while the pool is in the IDLE, ACTIVE, STOPPING, or RESIZING state, but not STARTING or SUSPENDED.SNOWPARK_CONTAINER_SERVICES_HISTORY, METERING_HISTORY, and METERING_DAILY_HISTORY (SERVICE_TYPE = 'SNOWPARK_CONTAINER_SERVICES')
Storage (image repository, stages, event tables)Standard Snowflake storage rates.Storage usage views (see Exploring storage cost)
Block storage and snapshotsStorage rates in the Service Consumption Table.Storage usage views
Outbound data transferData transfer rates by cloud and region.DATA_TRANSFER_HISTORY (TRANSFER_TYPE = 'SNOWPARK_CONTAINER_SERVICES')
Internal data transferSPCS same-cloud, same-region rate.DATA_TRANSFER_HISTORY (TRANSFER_TYPE = 'INTERNAL') and INTERNAL_DATA_TRANSFER_HISTORY

Local storage on a compute pool node is covered by the compute pool node cost and isn’t billed separately.

Storage cost

When you use Snowpark Container Services, storage costs associated with Snowflake, including the cost of Snowflake stage usage or database table storage, apply. For more information, see Exploring storage cost. In addition, the following cost considerations apply:

  • Image repository storage cost: The implementation of the image repository uses a Snowflake stage. Therefore, the associated cost for using the Snowflake stage applies.

  • Log storage cost: When you store local container logs in event tables, event table storage costs apply.

  • Mounting volumes cost:

    • When you mount a Snowflake stage as a volume, the cost of using the Snowflake stage applies.
    • When you mount storage from the compute pool node as a volume, it appears as local storage in the container. But there is no additional cost because the local storage cost is covered by the cost of the compute pool node.
  • Block storage cost: When you create a service that uses block storage, you are billed for block storage and snapshot storage. For more information about storage pricing, see the Snowflake Service Consumption Table. The SPCS Block Storage Pricing table in this document provides the information.

Compute pool cost

A compute pool is a collection of one or more virtual machine (VM) nodes on which Snowflake runs your Snowpark Container Services jobs and services. The number and type (instance family) of the nodes in the compute pool (see CREATE COMPUTE POOL) determine the credits it consumes and thus the cost you pay. For more information, see the Snowflake Service Consumption Table.

You incur charges for a compute pool in the IDLE, ACTIVE, STOPPING, or RESIZING state, but not when it is in a STARTING or SUSPENDED state. To optimize compute pool expenses, you should leverage the AUTO_SUSPEND feature (see CREATE COMPUTE POOL).

The following views provide usage information:

  • ACCOUNT_USAGE views

    The following ACCOUNT_USAGE views contain Snowpark Container Services credit usage information:

  • ORGANIZATION_USAGE views

Example queries

The following query returns the credits that each compute pool used per day over the last 30 days:

SELECT
    DATE_TRUNC('day', start_time) AS usage_date,
    compute_pool_name,
    SUM(credits_used) AS credits_used
  FROM SNOWFLAKE.ACCOUNT_USAGE.SNOWPARK_CONTAINER_SERVICES_HISTORY
  WHERE start_time >= DATEADD('day', -30, CURRENT_TIMESTAMP())
  GROUP BY 1, 2
  ORDER BY 1, 2;

To see hourly consumption, group by start_time instead of DATE_TRUNC('day', start_time).

The following query returns the daily credits that your account used for Snowpark Container Services:

SELECT usage_date, SUM(credits_used) AS credits_used
  FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_DAILY_HISTORY
  WHERE service_type = 'SNOWPARK_CONTAINER_SERVICES'
    AND usage_date >= DATEADD('day', -30, CURRENT_DATE())
  GROUP BY usage_date
  ORDER BY usage_date;

The following query returns the same information for each account in your organization:

SELECT account_name, usage_date, SUM(credits_used) AS credits_used
  FROM SNOWFLAKE.ORGANIZATION_USAGE.METERING_DAILY_HISTORY
  WHERE service_type = 'SNOWPARK_CONTAINER_SERVICES'
    AND usage_date >= DATEADD('day', -30, CURRENT_DATE())
  GROUP BY account_name, usage_date
  ORDER BY account_name, usage_date;

Data transfer cost

Data transfer is the process of moving data into (ingress) and out of (egress) Snowflake. For more information, see Understanding data transfer cost. When you use Snowpark Container Services, the following additional cost considerations apply:

  • Outbound data transfer: Snowflake applies the same data transfer rate for outbound data transfers from services and jobs to other cloud regions and to the internet, consistent with the rate for all Snowflake outbound data transfers. For more information, see the Snowflake Service Consumption Table (table 4a).

    You can query the DATA_TRANSFER_HISTORY ACCOUNT_USAGE view for usage information. The transfer_type column identifies this cost as the SNOWPARK_CONTAINER_SERVICES type.

  • Internal data transfer: This class of data transfer refers to data movements across compute entities within Snowflake, such as between two compute pools or a compute pool and a warehouse, that resulted from executing a service function. For more information, see the Snowflake Service Consumption Table (tables 4(a) for AWS, 4(b) for Azure, and the column titled “SPCS Data Transfer to Same Cloud Provider, Same Region”).

    To view the costs associated with internal data transfer, you can do the following:

The following query returns the bytes transferred over the last 30 days by Snowpark Container Services and internal transfers:

SELECT transfer_type, SUM(bytes_transferred) AS bytes_transferred
  FROM SNOWFLAKE.ACCOUNT_USAGE.DATA_TRANSFER_HISTORY
  WHERE transfer_type IN ('SNOWPARK_CONTAINER_SERVICES', 'INTERNAL')
    AND start_time >= DATEADD('day', -30, CURRENT_TIMESTAMP())
  GROUP BY transfer_type;

Note

Data transfer costs are currently not billed for Snowflake accounts on Google Cloud.