Skip to content

Clarification on Redshift Serverless Compute Billing During Idle Time

0

Hello,

I have a question about Redshift Serverless billing. The documentation says that compute is billed per second when queries run, and no compute charges apply when no queries are running.

If I run a very short query (for example, 1 second) and then the endpoint stays idle before auto-pausing:

Is the idle time before auto-pause billed?

Is there a recommended way to estimate compute cost for short queries including idle periods?

asked a month ago55 views
1 Answer
1
Accepted Answer

No, idle time before auto-pause is not billed. Amazon Redshift Serverless only charges for actual compute usage when queries are running. Idle time doesn't add to RPUs consumed.

However, there are a few important considerations for estimating compute costs:

Minimum Charge: You pay for workloads in RPU-hours on a per-second basis with a 60-second minimum charge. So even if your query runs for just 1 second, you'll be charged for at least 60 seconds of compute.

Transaction Completion: Usage is metered and recorded after a transaction completes. It's important to end transactions properly to avoid unnecessary RPU use, as open transactions can continue to consume resources.

Recommended Cost Estimation Approach: To estimate compute costs for your workloads, you should query the SYS_SERVERLESS_USAGE system view, which provides cost and usage data at 1-minute granularity. Specifically, use the charged_seconds column rather than compute_seconds for accurate billing representation. You can calculate total charges by aggregating charged_seconds and multiplying by your RPU price:

(sum(charged_seconds)/3600) * <Price for 1 RPU>

The SYS_SERVERLESS_USAGE view retains data for 7 days, allowing you to analyze your actual usage patterns and costs over time. This will give you the most accurate picture of what you're being charged, including the minimum charge periods, rather than trying to estimate based on query execution time alone.
Sources
SYS_SERVERLESS_USAGE - Amazon Redshift
Billing for on-demand compute capacity - Amazon Redshift
Billing for Amazon Redshift Serverless - Amazon Redshift

answered a month ago
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.