dev
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.
stacktape dev --stage <<stage>> --region <<region>> --resourceName <<resourceName>>
API reference
Options
region (--r)
Required
resourceName (--rn)
Required
stage (--s)
Required
awsAccount (--aa)
configPath (--cp)
container (--cnt)
currentWorkingDirectory (--cwd)
disableEmulation (--de)
dockerArgs (--da)
help (--h)
logFormat (--lf)
logLevel (--ll)
preserveTempFiles (--ptf)
profile (--p)
projectName (--prj)
templateId (--ti)
watch (--w)