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
- Rename the callback from
debugStack(app, stack, props)
todebugApp(app)
; - Create
DebugStack
inside thedebugApp
callback;
new sst.DebugStack(app, "debug-stack");
- If you used to reference
props.stage
, change it toapp.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
Update using:
$ npx sst update 0.65.3
$ yarn sst update 0.65.3