Ross Coundon
03/01/2022, 5:06 PMFrank
enableLiveDev flag, like this:
new Function(this, "MyFn", {
handler: "lambda/index.main",
enableLiveDev: false,
});
Does that help?Sione
03/02/2022, 2:50 AMenableLiveDev. If you’re wanting to disable some lambdas from being triggered by event sources like you mentioned regarding cronjob. What I’ve done in general is conditionally disabled cronjobs on my local dev stacks. SST Cron or CDK event targets construct have a prop enabled that is true by default that I used. If it’s false the cron schedule won’t trigger the lambda. I think most, if not all event sources constructs have this enabled prop. I would then trigger them manually with CLI or much better with SST console to run the lambda when needed on local for testing etc.
new sst.Cron(this, 'CronJob', {
schedule: 'rate(1 minute)',
job: 'index.main',
eventsRule: {
enabled: !scope.local,
},
})Ross Coundon
03/02/2022, 7:38 AMsst start with an option to only debug a single lambda, or maybe a small handful of lambdas without needing to touch the code. This could be via a CLI option e.g.
sst start --enable-for some-lambda-func-name,some-other-lambda-func-nameAkos
03/02/2022, 6:05 PMAkos
03/02/2022, 6:06 PMFrank
sst start --enable-for some-lambda-func-name,some-other-lambda-func-nameRoss Coundon
03/03/2022, 1:15 PMFrank
Ross Coundon
03/03/2022, 1:26 PMFrank
Frank
Ross Coundon
03/03/2022, 5:52 PM