npm @serverless-stack/cli 0.65.3
v0.65.3

latest releases: 1.18.4, 1.18.3, 1.18.2...
2 years ago

Major changes to customizing DebugStack

When you run sst start, SST deploys a debug stack to setup Live Lambda Development environment. Prior to this release, you only could customize the debug stack after the stack had been created using the debugStack() callback. Starting with this release, you have full control over the DebugStack.

What do I need to do

  1. Rename the callback from debugStack(app, stack, props) to debugApp(app);
  2. Create DebugStack inside the debugApp callback;
  new sst.DebugStack(app, "debug-stack");
  1. If you used to reference props.stage, change it to app.stage

Examples

If you were adding a custom tag like this:

export function debugStack(app, stack, props) {
  cdk.Tags.of(app).add("my-stage", props.stage);
}

Change it to:

export function debugApp(app) {
  new sst.DebugStack(app, "debug-stack");
  cdk.Tags.of(app).add("test", `${app.stage}-${app.region}`);
}

You can also customize the stack name and the synthesizer.

export function debugApp(app) {
  new sst.DebugStack(app, "debug-stack", {
    stackName: app.logicalPrefixedName("live-debug"),
    synthesizer: new cdk.DefaultStackSynthesizer({
      qualifier: 'randchars1234',
    }),
  });

  cdk.Tags.of(app).add("test", `${app.stage}-${app.region}`);
}

Read more about customizing the DebugStack.

🚀 Enhancement

🐛 Bug Fix

  • #1388 ApiGatewayV1Api: cannot set restApiName (@fwang)

Update using:

$ npx sst update 0.65.3
$ yarn sst update 0.65.3

Don't miss a new cli release

NewReleases is sending notifications on new releases.