stage status

The stage status command shows where a stage that uses sleep is: awake, asleep, going to sleep or waking up. It also shows since when and why, what the sleep stopped, what keeps billing, and when the stage changes next. It changes nothing.

Usage

stacktape stage status --stage <stage> --region <region>

Example output:

Stage staging is asleep since Tue 1 Dec 19:02 (Europe/Prague).
It is outside the awake hours (Monday to Friday, 08:00 to 19:00, Europe/Prague).
Next: it is up at Wed 2 Dec 08:00 (Europe/Prague), when its awake hours start. Waking starts at 07:47.

Stopped: api (containers), mainDb (database).

What keeps billing while it sleeps:
  mainDb: It is stopped. Its storage and backups keep billing. (about $2.54 a month)
  api.loadBalancer: AWS bills a load balancer by the hour, used or not. It cannot be stopped. (about $18 a month)
  Everything else: Functions, schedules and queue triggers keep running. Storage, logs and everything billed by use bill as before.
  Each amount is an estimate of the charge named, at AWS list prices of 28 Nov 2026. Charges by use come on top.

Asleep 62.5 hours in the last 7 days: about $1.83 not billed. That is an estimate: the hours times the price of what the sleep stops, at AWS list prices of 28 Nov 2026. The last wake took 6 min 40 s.

A stage with whenIdle that went to sleep because nobody used it says so:

Stage pr-42 is asleep since Tue 1 Dec 21:14 (UTC).
Nobody used it for 30 minutes. Opening its address or a message in a worker's queue wakes it.
It stays asleep until someone opens its address, a message arrives in a worker's queue, or someone wakes it: `stacktape stage wake`, the Console, or a deploy.

and after a wake it names what woke it: The last wake (by a visit to its address, Tue 1 Dec 20:20 (UTC)) took 1 min 14 s.

On a stage without sleep the command says that the stage is always awake.

The amounts

The amounts are estimates. Stacktape computes them on your machine from the configuration the stage was last deployed with and from AWS list prices, without your bill. An amount covers only the charge its line names:

LineAmount
A resource that keeps runningIts whole fixed monthly price.
A stopped databaseIts storage, where storage has a fixed price. Aurora bills storage by use, so an Aurora database has no amount.
A stopped NAT instanceIts public IP address.
A load balancer of a sleeping serviceIts hourly price.

A line has no amount when the charge is billed by use, when Stacktape cannot price the resource, or when the resource's size comes from a directive such as $Secret(). Public IP addresses of load balancers and discounts such as Savings Plans are not in any amount.

The amount next to the hours asleep is what those hours did not bill: the hours times the hourly list price of what the sleep stops (container tasks, database instances, NAT and bastion instances). It is a projection, not a measurement from your bill. A database that was busy when the stage went to sleep, for example, kept running. Without prices, or when a stopped resource's size comes from a directive, the line shows the hours only.

Flags reference

stacktape stage statusCLI options
-r, --regionrequired"us-east-2" | "us-east-1" | "us-west-1" | "us-west-2" | "ap-east-1" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "me-south-1" | "sa-east-1" | "af-south-1" | "eu-south-1"

AWS Region

The AWS region for the operation. For a list of available regions, see the AWS documentation.

For commands such as deploy, this flag overrides the project's configured region. If you omit it, Stacktape checks the project's config, AWS_DEFAULT_REGION, the default saved with defaults set, then the AWS profile.

-s, --stagerequiredstring

Stage

The stage for the operation (e.g., production, staging, dev-john). You can set a default stage using the defaults set command. Stage names use lowercase letters, numbers and dashes, with at least 2 characters. The project name, a dash and the stage form the CloudFormation stack name, which can have at most 128 characters. Stacktape shortens an AWS resource name that would be too long and adds a hash.

--aws-accountstring

AWS Account

The name of the AWS account to use for the operation. The account must first be connected in the Stacktape Console.

Without it, the account is chosen by --profile, AWS_PROFILE or AWS credentials in environment variables, then by your saved default, then by your organization's only connected account. --aws-account takes precedence over all of them, but AWS credentials in environment variables must then belong to that account.

-c, --configstring

Config File Path

The path to your Stacktape configuration file, relative to the current working directory. Without it, Stacktape uses the one stacktape.ts, stacktape.yml, stacktape.yaml or stacktape.js in the working directory. When there are several, the command stops and asks you to choose one with this option.

--cwdstring

Current Working Directory

The working directory for the operation. All file paths in your configuration will be resolved relative to this directory. By default, this is the directory containing the configuration file.

-h, --helpstring

Show Help

If provided, the command will not execute and will instead print help information.

--log-level"info" | "debug" | "error"

Log Level

The level of logs to print to the console.

  • info: Basic information about the operation.
  • error: Only errors.
  • debug: Detailed information for debugging.
-p, --profilestring

AWS Profile

The AWS profile to use for the command. You can manage profiles using the aws-profile:* commands and set a default profile with defaults set.

For commands that use a connected AWS account, --profile (or AWS_PROFILE) selects the connected account the profile belongs to, unless --aws-account is set. The command fails if that account is not connected.

--projectstring

Project Name

The name of the Stacktape project for this operation.

Commands that target a stack take it from projectName in the project's config when the flag is absent.

--quietboolean

Quiet

Hide progress, banners, success messages and hints. Command output, warnings and errors are still printed.

JSON output

With --agent the command prints one JSON object:

FieldMeaning
contractVersion2. It changes when a field is removed or renamed, or state gets a new value.
sleepConfiguredfalse for a stage without sleep.
stateawake, going-to-sleep, asleep or waking. unknown when the record of what the sleep stopped is missing or unreadable.
recordProblemmissing or unreadable when state is unknown, otherwise null. problem then says how to get the record back.
sinceWhen the stage entered this state (ISO 8601), or null.
whyschedule, manual, deploy, queue, production, idle (nobody used it), visit (someone opened its address) or work (a message arrived in a worker's queue), or null. whyText says the same in a sentence.
nextChange{ "at": "<time>", "to": "awake" | "asleep" }, or null when no change is planned. For a wake by the awake hours, upBy is their start: the stage is meant to be up then, and the wake starts earlier, at at.
heldAwakeUntilSet after a wake by hand or by a deploy: the stage stays awake until then.
stoppedWhat the sleep stopped and nothing has started again: resourceName and kind.
stillBillingWhat keeps billing while the stage sleeps: resourceName, reason and monthlyUsd, an estimate of the fixed monthly charge the reason names (null when not known or billed by use).
pricesAsOfWhen the AWS list prices behind monthlyUsd and notBilledLast7DaysUsd were read (ISO 8601), or null when no amount could be estimated.
asleepHoursLast7Days, lastWakeSecondsNumbers, or null.
notBilledLast7DaysUsdWhat the hours asleep did not bill, projected from the AWS list prices of pricesAsOf, or null when the hours or the prices are not known.
lastWakeThe last wake of the stage after a sleep: by (what asked for it, as in why), at and seconds. null before the first.
whenIdle{ "afterMinutes": <minutes> } for a stage with whenIdle, otherwise null.
spotShortageWhile a wake waits for Fargate Spot capacity that AWS does not have: since and resourceNames. Otherwise null.
problemThe reason the last sleep or wake failed, or null. Stacktape retries by itself.

Examples

stacktape stage status --stage staging --region eu-west-1
stacktape stage status --stage staging --region eu-west-1 --agent