Scaleway DocumentationFAQ
serverless functions

Serverless Functions

Let us address the most common questions you have about Serverless Functions.

How am I billed for Serverless Functions?

Principle

Serverless Functions is billed on a pay-as-you-go basis. Three components are taken into account:

  • Monthly Request number: each time your function is invoked we increase a counter.
  • Resource consumption: this component is obtained by multiplying the memory tiers chosen (128MB, 256MB, 512MB, 1024MB, 2048MB) by the duration of each function invocation.
  • Resources provision: in order to mitigate cold start, users can choose to keep some function Instances warm (by filing the min scale value). We then charge for the provisioned resources similarly to the Resources consumption component.

The scheme below illustrates our billing model:

Pricing

  • Monthly requests: €0.15 per million requests and we offer 1m free requests per account per month.
  • Resources consumption: €1.20 per 100k GB/s and we provide 400 000 GB/s free tiers per account and per month.
MemoryPrice per sec
128 MB€0.0000015
256 MB€0.0000030
512 MB€0.0000060
1024 MB€0.0000120
2048 MB€0.0000240
  • Resources provision: €0.36 per 100k GB/s
MemoryPrice per sec
128 MB€0.0000005
256 MB€0.0000009
512 MB€0.0000018
1024 MB€0.0000036
2048 MB€0.0000072

Examples

Example 1: Without resources provisioning

CriteriaValue
Number of requests30 000 000
Average request duration1 s
Allocated resources (memory)128 MB
Include Free TiersYes
Provision/minscale0
  • Resources consumption
    • Service usage duration: 30 000 000 Requests * 1 s = 30 000 000 seconds used
    • Memory conversion: 128 MB = 0.125 GB
    • Resources consumed: 30 000 000 s * 0.125 Go = 3 750 000 GB/s
    • Free Tier: 400 000 GB/s
    • Resourced billed: 3 750 000 - 400 000 = 3 350 000 GB/s
    • Cost: 3 350 000 * €0.0000120000 = €40.20
  • Requests:
    • Free Tier: 1 000 000 Requests
    • Billed requests: 30 000 000 - 1 000 000 = 29 000 000 Requests
    • Cost: 29 000 000 * €0.00000015 = €4.35

Total Monthly cost: €44.55

Example 2: With resources provisioning

CriteriaValue
Number of requests30 000 000
Average request duration1 s
Allocated memory128 MB
Include Free TiersYes
Provision/minscale1
  • Resources consumption:
    • Service usage duration: 30 000 000 Requests * 1 s = 30 000 000 seconds used
    • Memory conversion: 128 MB = 0.125 GB
    • Resources consumed: 30 000 000 s * 0.125 GB = 3 750 000 GB/s
    • Free Tier: 400 000 GB/s
    • Billed resources: 3 750 000 - 400 000 = 3 350 000 GB/s
    • Cost: 3 350 000 * €0.0000120000 = €40.20
  • Provisioned functions consumption:
    • Provisioned duration: 1 month = 2 592 000 seconds, with minscale=1 → 2 592 000 seconds used
    • Provisioned resources consumed: 2 592 000 *0.125GB = 324 000 GB/s
    • Cost: 324 000 * €0.0000036 = €1.20
  • Requests:
  • Free Tier: 1 000 000 Requests
  • Billed requests: 30 000 000 - 1 000 000 = 29 000 000 Requests
  • Cost: 29 000 000 * €0.00000015 = €4.35

Total Monthly cost: €45.75