Stacktape
Stacktape


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 events section to your local machine.
  • Injects environment variables from $ResourceParam and $Secret directives 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 --disableEmulation to run a workload that has not yet been deployed.
  • Streams container logs to the console.
  • You must specify which container to run using the --container option.

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.



import { Stacktape } from "stacktape";
const stacktape = new Stacktape();
stacktape.dev({
region: "<<region>>",
resourceName: "<<resourceName>>",
stage: "<<stage>>"
});

API reference

Arguments

region
Required
resourceName
Required
stage
Required
awsAccount
configPath
container
currentWorkingDirectory
disableEmulation
dockerArgs
preserveTempFiles
profile
projectName
templateId
watch

Contents

  •  Overview and basic usage
  •  dev
  •  For Lambda functions:
  •  API reference