Overview and basic usage
dev
Runs a resource in development mode, enabling local development and debugging.
For container workloads:
- Maps all container ports specified in the
eventssection to your local machine. - Injects environment variables from
$ResourceParamand$Secretdirectives into the container. - Injects temporary AWS credentials, giving your local container the same IAM permissions as the deployed version.
- Requires a deployed stack for emulation. Use
--disableEmulationto run a workload that has not yet been deployed. - Streams container logs to the console.
- You must specify which container to run using the
--containeroption.
For Lambda functions:
- Quickly redeploys the function without using CloudFormation.
- Streams logs from CloudWatch to your console.
- The function runs in the same AWS environment as in production.
In development mode, the resource will automatically restart or redeploy when you type rs and press Enter in the
terminal. If you use the --watch flag, it will also trigger on any source file change.
API reference
region (--r)Required
AWS Region
Type: string
Possible values: af-south-1ap-east-1ap-northeast-1ap-northeast-2ap-northeast-3ap-south-1ap-southeast-1ap-southeast-2ca-central-1eu-central-1eu-north-1eu-south-1eu-west-1eu-west-2eu-west-3me-south-1sa-east-1us-east-1us-east-2us-west-1us-west-2
The AWS region for the operation. For a list of available regions, see the AWS documentation.
resourceName (--rn)Required
Type: string
stage (--s)Required
Stage
Type: string
The stage for the operation (e.g., production, staging, dev-john). You can set a default stage using the defaults:configure command. The maximum length is 12 characters.
awsAccount (--aa)
AWS Account
Type: string
The name of the AWS account to use for the operation. The account must first be connected in the Stacktape console.
configPath (--cp)
Config File Path
Type: string
The path to your Stacktape configuration file, relative to the current working directory.
container (--cnt)
Container Name
Type: string
The name of the container as defined in your container compute resource configuration.
currentWorkingDirectory (--cwd)
Current Working Directory
Type: string
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.
disableEmulation (--de)
Disable Emulation
Type: boolean
Disables the automatic injection of parameters and credentials during local emulation. Use this flag if you want to run a compute resource locally that has not yet been deployed.
dockerArgs (--da)
Docker Arguments
Type: array
Additional arguments to pass to the docker run or docker build commands.
help (--h)
Show Help
Type: string
If provided, the command will not execute and will instead print help information.
logFormat (--lf)
Log Format
Type: string
Possible values: basicfancyjsonnormal
The format of logs printed to the console.
fancy: Colorized and dynamically re-rendered logs.normal: Colorized but not dynamically re-rendered logs.basic: Simple text only.json: Logs printed as JSON objects.
logLevel (--ll)
Log Level
Type: string
Possible values: debugerrorinfo
The level of logs to print to the console.
info: Basic information about the operation.error: Only errors.debug: Detailed information for debugging.
preserveTempFiles (--ptf)
Preserve Temporary Files
Type: boolean
If true, preserves the temporary files generated by the operation, such as the CloudFormation template and packaged resources. These files are saved to .stacktape/[invocation-id].
profile (--p)
AWS Profile
Type: string
The AWS profile to use for the command. You can manage profiles using the aws-profile:* commands and set a default profile with defaults:configure.
projectName (--prj)
Project Name
Type: string
The name of the Stacktape project for this operation.
templateId (--ti)
Template ID
Type: string
The ID of the template to download. You can find a list of available templates on the Config Builder page.
watch (--w)
Watch
Type: boolean
If true, watches for changes to your source files and automatically re-executes the compute resource when a change is detected.