Cost Estimates

Every stacktape deploy and stacktape diff shows what your configuration costs per month at AWS list prices, and how the deploy changes that cost. stacktape init shows the same estimate for the file it writes.

The estimate is made on your machine. Your configuration is never sent anywhere to be priced, and it works without a Stacktape account.

What a deploy shows

Before the last confirmation, the deploy prints a block like this one:

Monthly cost estimate at AWS list prices in eu-west-1 as of 1 Dec 2026:
  Fixed: at least $53/mo
    db $31/mo (up to $54/mo at its configured maximum)
    api $21/mo (up to $64/mo at its configured maximum)
  Change from the deployed version v000012: +$13/mo fixed
    db $18/mo → $31/mo, at the configured maximum $41/mo → $54/mo
  Billed per use:
    Log data ingested into CloudWatch: $0.57 per GB (api)
    Log data stored in CloudWatch: $0.03 per GB-month (api)
    HTTP API requests: $1.11 per 1M requests (api)
    S3 storage: $0.023 per GB-month (uploads)
  Billed by others (not priced; see their pricing):
    mongo: MongoDB Atlas, cluster tier M10
  Not priced:
    api: Cloud Map service discovery (a private namespace and one registration per running task)
    db: backup storage beyond the size of the database

The estimate never shows one total, because a total would hide what depends on your traffic.

PartWhat it contains
FixedWhat the stage costs every month, whatever the traffic: container tasks at their minimum count, database instances and their allocated storage, load balancers and their public IPv4 addresses, NAT, CloudWatch alarms (per metric each alarm watches, Console global alarms included) and Lambda provisioned concurrency. "Up to" is the cost at the maximum you configured, such as the most tasks scaling can start, the largest database storage or the highest Aurora capacity; a service that scales from zero tasks is listed with $0 and its maximum. "At least" means a charge that bills every month is listed under "Not priced".
Billed per useRequests, compute time, logs, stored data and processed data, each with its unit price. The estimate does not know your traffic, so these are not in the fixed amount.
Billed by othersResources another company bills, such as MongoDB Atlas or Upstash. They are not part of your AWS bill, and Stacktape does not quote their prices.
Not pricedCharges Stacktape does not price, with the reason.
NotesContext that is not a charge, such as a stage that uses the shared NAT of the non-production network.

Stacktape prices a product only when its rate and unit were checked against AWS's price page. A charge it cannot price reliably is listed under "Not priced" instead of being guessed. Today that includes:

  • CloudFront requests and data transfer (the rates depend on where your viewers are);
  • Cognito user pools (the rate depends on the feature plan);
  • Cloud Map service discovery behind an HTTP API, backup storage beyond the database size, SQS requests, Step Functions state transitions, CloudWatch Synthetics canaries and the compute of batch jobs;
  • changes made by CloudFormation overrides, alarms of a kind the estimate cannot count, and resources it does not know, such as CDK constructs.

A stage that sleeps

For a stage with sleep, the fixed amount counts what sleep stops only for the hours the stage is awake: container tasks, database instances, NAT instances and bastions. Load balancers, NAT gateways, database storage, the public IPv4 address of a NAT instance and everything sleep keeps running are counted for the whole month. The fixed line says what it assumes:

  Fixed: $63/mo (asleep 6 h 10 min a day; $86/mo if always awake)
  • With awakeHours, the estimate uses the hours outside them, less the wake that starts before them, so the stage is up at from, and the time it takes to go to sleep after them: 10 minutes a day with containers only, 19 with a stopped database. A stage that sleeps on some days only shows the hours asleep a week.
  • With awakeHours and whenIdle, the stage stays awake through its awake hours. After them it sleeps only once nobody has used it for afterMinutes (30 by default), and a visit wakes it again. The estimate adds afterMinutes to each awake period, so it shows the lowest the bill can be and the most the stage can sleep: from $63/mo (asleep at most 5 h 40 min a day; $86/mo if always awake). A preview deploy gets whenIdle, so a preview with awakeHours shows this.
  • With only whenIdle, or no schedule at all (sleep by hand), nobody can tell how long the stage sleeps. The estimate shows the price of a stage that never sleeps and says "less while asleep". A preview deploy gets whenIdle, so it shows this too.

stacktape cost prices a deployed stage the same way. It also adds the per-use charges it measured over the last 14 days. Its total adds up everything that is priced; when some per-use charges are not measured, the total reads "from $X a month" and the output names what it does not count.

The change from the deployed version

Each deploy stores the configuration it deployed with its release, in the stack's deployment bucket in your AWS account. The next deploy reads that configuration back and prices it with the same prices as the new one. The difference therefore comes from your changes, never from AWS changing a price in between. The comparison also names a changed scaling maximum, a changed unit price (for example a function moved from x86 to arm64), a resource that is newly billed by another company, and a setting that changes what each use costs, such as resizeImage: each second of run time costs 8× more (1,024 MB instead of 128 MB). That last kind has no monthly amount, because the estimate does not know your usage.

  • A deploy that changes only code shows "no change".
  • After stacktape rollback, the next deploy compares with the release the rollback restored.
  • stacktape diff shows the same comparison without deploying.

The deploy shows the new estimate without a comparison, and says why, when:

  • it is the stage's first deploy;
  • the last deploy failed and left the stack half updated, so its resources may not match the stored configuration;
  • the deployed release has no stored configuration (for example, a release made by an old CLI version);
  • the stored configuration cannot be read or priced;
  • the deployed configuration sets a priced value, such as a size, a task count, an alarm or an override, with a directive like $CliArgs() that cannot be resolved again later.

A price never holds up a deploy

The estimate is computed while the deploy builds. Reading the stored configuration has a time limit of four seconds, and the deploy waits at most five seconds more for the estimate. When something goes wrong, the deploy prints one line, such as Could not estimate the price: …, and continues. A rollback copies the restored configuration for the next comparison only when it can, within the same limit; when it cannot, the next deploy says there is no comparison instead of comparing with a configuration it cannot trust.

Where the prices come from

The prices are AWS's on-demand list prices in USD, from AWS's public price list. Stacktape reads them before each release and bundles them with the CLI, so they are as old as your CLI version, and updating the CLI updates them. The first line of the estimate gives their date. Nothing is downloaded: estimates work offline and send nothing about your account or project. The Console prices with the same bundled prices.

What the estimate does not know

  • Your traffic, data volumes and how long your functions run.
  • Credits, Savings Plans, Reserved Instances, free tiers and private pricing agreements.
  • Spot prices. AWS does not publish Fargate Spot prices in its price list, so Spot tasks are listed as billed per use, at most the on-demand rate.
  • Taxes and data transfer out of AWS.
  • The shared NAT of the non-production network. A stage placed there does not pay for a NAT of its own; the shared network's stack does.

The estimate uses a 30-day month (720 hours).

For coding agents

stacktape deploy --agent and stacktape diff --agent return the estimate in the command result as price (schemaVersion: 1): the parts under estimate (fixed, usage, thirdParty, unpriced and notes), the age and source of the prices under prices, and, when there is one, the comparison under comparison with the deployed version, its estimate and the change. When there is no comparison, noComparisonReason says why; when there is no estimate at all, problem does.