Close
logoStacktape docs



invoke-local

Invokes specified workload locally on your system. Emulates live AWS environment as closely as possible. Automatically injects any required parameters.

stacktape invoke-local --region <<region>> --stage <<stage>> --workload <<workload>>

Arguments API reference

Command options API reference
Required
region (--r)
Type: string ENUM

AWS region for given command.

Required
stage (--s)
Type: string

Stage to deploy your stack to. Example stages are production, staging, etc.

Required
workload (--wl)
Type: string

Name of the workload as specified in the stacktape config.

configPath (--cp)
Type: string

Path (relative to cwd) to your stacktape configuration file. By default, it's stacktape.yml.

currentWorkingDirectory (--cwd)
Type: string

Current working directory. All file paths in your config will be resolved relatively to specified cwd. Default: directory containing configuration file.

dockerArgs (--da)
Type: array

Arguments to pass to docker run or docker build

event (--e)
Type: string

Event to use for this invocation. Specified using {file-path}:{event-name} syntax.

eventName (--en)
Type: string

Event to use for this incovation. Event should be exported from file specified using invokeLocalConfig.testEventFilePath property in stacktape configuration.

ignoreMissingOutput (--imo)
Type: boolean

Ignores missing outputs from $GetParam and $GetSecret directives for local invocation. Helpful if referenced resources in these directives are not yet deployed.

jsonEvent (--je)
Type: string

Event to use for this invocation. Specified using raw JSON string.

logFormat (--lf)
Type: string ENUM

Format of logs that are being printed to your console. You can learn more at https://docs.stacktape.com/cli/using-cli Default: 'fancy'

logLevel (--ll)
Type: string ENUM

Level of logs that are being printed to the console. You can use 'debug' for more information about what's being done, or 'error' to show only errors. Default: 'info'

logOutput (--lo)
Type: boolean

Logs output returned from specified workload to the console.

nativeExecutable (--ne)
Type: boolean

Use system's native executable for this workload. This option is faster, but doesn't closely emulate AWS environment.

port (--pt)
Type: string

Can't remember what's this good for. Sorry. @todo

preserveTempFiles (--ptf)
Type: boolean

Preserves temporary files that stacktape generates.

profile (--p)
Type: string

AWS profile to use.

watch (--w)
Type: boolean

Watch for changes made to your source files and re-execute workload when they change.