param get

Retrieve the runtime value of a referenceable parameter from a resource in a deployed stack. Use param get to fetch URLs, connection strings, ARNs, and other outputs directly from the CLI — without opening the AWS Console or parsing CloudFormation outputs. The three required arguments are --region, --resource-name, and --param-name.

Usage

stacktape param get myApi url --region eu-west-1

The command does not require a local Stacktape configuration file. The command takes the resource name and the parameter name as positional arguments (param get <resource-name> <param-name>) and requires --region; optional stack-selection arguments such as --stage or --project can still be used when needed to identify the target stack. --stage is optional; pass it when you need to target a specific stage explicitly.

Common scenarios for param get:

  • Feed an endpoint URL into a local script or test harness.
  • Retrieve a database connection string for a one-off migration tool.
  • Read a resource ARN to pass into another CLI command or CI step.
  • Verify the actual deployed value of a parameter after a deploy completes.

If you need a broader overview of all stack outputs and resources at once, use status instead.

Arguments reference

stacktape param get <resource-name> <param-name>CLI options
--param-name (positional 2)requiredstring

Parameter Name

The name of the resource parameter.

-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.

Inside a project whose config declares region, the flag is optional and overrides the config.

--resource-name (positional 1)requiredstring

Resource Name

The name of the resource as defined in your Stacktape configuration.

--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.

-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.

--show-secretsboolean

Show Secrets

If true, the command includes secret values in its output: database passwords, connection strings with credentials and other stack parameters Stacktape stores as sensitive, and the value a secret get reads. Without it, each of them is <> in the terminal, in JSON output and in the stack-info file. Use it only where the output stays private, never in shared CI logs.

-s, --stagestring

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.

Examples

Retrieve a parameter from a deployed resource.

stacktape param get api url --region us-east-1

Pass --stage when you want to target a specific stage explicitly. Include it unless you have set a default stage via defaults set.

stacktape param get mainDatabase connectionString --region eu-west-1 --stage production

A parameter that holds a credential, such as a database password or a connectionString that contains one, comes back as <<OMITTED>> unless you pass --show-secrets. Use the flag only where the output stays private:

stacktape param get mainDatabase connectionString --region eu-west-1 --stage production --show-secrets

For programmatic consumption in scripts or CI steps, use --agent or --json to get machine-readable JSONL output. The default interactive output includes formatting that is not suitable for shell variable capture.

stacktape param get api url --region eu-west-1 --agent

The available parameter names depend on the resource type. See referenceable parameters for the full list grouped by resource type.

Error handling

If the resource name does not exist in the deployed stack overview, the command throws the missing-resource error (e77) for that stack and resource lookup. Double-check that the resource name matches the key used in your Stacktape configuration.

If the parameter name is not found for the given resource, the command throws the invalid-parameter error (e78) and passes the resource type plus the available referenceable parameter names to the error handler. This makes it straightforward to discover the correct parameter name without leaving the terminal.

param get FAQ

How do I find the available parameter names for a resource?

Each Stacktape resource type exposes a specific set of referenceable parameters. The full list is documented at referenceable parameters. You can also trigger the e78 error intentionally by passing an invalid --param-name — the error output includes the valid parameter names for that resource type.

Does param get require a deployed stack?

Yes. The command queries a deployed stack to read the parameter's runtime value. If the stack has not been deployed yet, there is nothing to retrieve. Deploy first with deploy, then use param get to read outputs.

How do I capture the value in a shell script or CI step?

Pass --agent or --json to get machine-readable JSONL output (one JSON object per line). The default interactive output includes colors and formatting that are not suitable for capturing into a shell variable or parsing in a pipeline step.

What is the difference between param get and status?

param get retrieves a single parameter value from a single resource — ideal for scripting and automation. status returns a broader overview of all outputs and AWS resources in the stack — better for exploration and discovery after a deployment.

  • status — view all outputs and resources in a deployed stack.
  • synth — compile your Stacktape configuration into a CloudFormation template for inspection before deployment.
  • defaults set — set default region and stage so you can omit them from repeated commands.