# Paying for it

> Where the money goes before a single request arrives, and when that's worth it.

- Concepts by Nicolas Dao (Cloudless Labs, Sydney). Web page: https://cloudlesslabs.com/concepts/areas/cost/

Every service has a cost shape: what it costs doing nothing, and what each unit of work adds. Most surprises on a cloud bill come from a floor nobody noticed, or a slope that looked cheap at small volume.

The first decision is whether each part of a system should cost nothing when it's idle, or run all the time so it's always ready.

## The decisions, in order

1. [Pay for the work, or pay to be ready?](https://cloudlesslabs.com/concepts/pay-to-be-ready/index.md): Should this part of the system cost nothing when it's idle, or run all the time so it's always ready? Every service has a cost shape: a floor (what it costs doing nothing) and a slope (what each unit of work adds). Scale-to-zero has no floor and the steepest slope, plus a wait after a quiet spell. Always-on has a floor and a flatter slope. A commitment discounts the floor for years. Read two numbers, the load at 3 am and the average against the peak: near zero at night means pay per use; high all day means pay to be ready, then commit to the floor once it's proven.

## If you chose this, use this

- **Pay for the work:** [Lambda](https://cloudlesslabs.com/stack/aws-lambda/index.md), [Fargate scheduled tasks](https://cloudlesslabs.com/stack/aws-fargate-scheduled-tasks/index.md), [Neon](https://cloudlesslabs.com/stack/neon/index.md): [Lambda, Fargate or EC2?](https://cloudlesslabs.com/stack/guides/lambda-or-containers/index.md)
- **Pay to be ready:** A [Fargate service](https://cloudlesslabs.com/stack/aws-fargate-service/index.md) for a steady HTTP core, [Aurora](https://cloudlesslabs.com/stack/aws-aurora/index.md) for heavy steady load
- **Pay to be ready, in advance:** [Savings Plans](https://cloudlesslabs.com/stack/aws-savings-plans/index.md), bought for the floor once three months of usage show it

## Related

- [Moving data between services](https://cloudlesslabs.com/concepts/areas/moving-data/index.md): Events, messages and records travelling from the code that knows to the code that acts.
- [Putting AI into software](https://cloudlesslabs.com/concepts/areas/ai/index.md): Which kind of intelligence each step of a feature needs, and what happens when it's unsure.
- [Security, access and residency](https://cloudlesslabs.com/concepts/areas/security/index.md): Where the data may go, who can reach it, and what runs where it can't do harm.
- [Every concept](https://cloudlesslabs.com/concepts/index.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
