Does SST provide any convenience method/command fo...
# sst
a
Does SST provide any convenience method/command for invoking local functions directly. I understand and see many examples of using integrated services to trigger the local function via the debug stack (APIGW, SQS, all the other things). But I’m curious if there is a more convenient way when working on initial iterations of a function without any triggers yet. I know I can invoke the stub directly from AWS console or using AWS CLI, but does SST provide any type of local invoke command? I couldn’t find anything in the docs, but figured I would ask here.
t
@Frank just released a local ui recently checkout the last release
f
@Austin update to v0.52.0 and use the
--console
flag
Copy code
npm run start -- --console
or
Copy code
yarn start --console
j
d
thats really cool, I created a little stack I use for this, ill give feedback if any features are missing. Your guy's sounds much more pleasant to use.
a
Awesome, thanks everyone! Perfect timing haha
d
I think mainly the only features missing to totally replace my mini stack would be to introduce: • Functions that are just invoked directly (standalone). • The ability to send payloads (body on API or Payload on invoke or Eventbridge/SNS/SQS, etc). This feature may exist on some of these, but I haven't seen it.
f
Thanks @Derek Kershner! Putting them down. To the second point, SNS/SQS already supported, EventBridge coming soon.
d
ok, I hadnt tried SNS yet, but that is helpful to me. Thank you.
One other question, @Frank, on CRON, currently for the SST stacks, I detect when they are local, and set the CRON to something that will never run (to avoid two CRONs running always). Is this necessary, or does SST handle this?
f
Personally I set the CRON memory to 128MB locally, and just let them run. But now you mentioned it, I think we can make this an option to
sst start
.
a
I’ll second @Derek Kershner and say it would be awesome to see sst.Function construct explicitly in this tool and allow invoking it directly. I am not using the Cron construct as I’m using an EventBridge rule to schedule a Step Functions state machine execution, which leverages the sst.Function. Would love to be able to invoke the function locally directly without needing to go through EventBridge or Step Functions.
Love the direction, though!
f
@Austin noted!
d
Personally I set the CRON memory to 128MB locally, and just let them run. But now you mentioned it, I think we can make this an option to 
sst start
.
@Frank, I worry about if you had 10 developers and a downstream rate limit or something, because the local stack stays deployed and will run forever (without specifically removing it).
its no big deal, though, not urgent for me at all, easy to override
in case its valuable to anyone:
const NEVER_CRON = "cron(15 10 ? * 6L 1970)";
(it'll run if we ever somehow hit the last day of a week in 1970 again)
j
This is great feedback! Thanks all!