Ryan
11/23/2021, 5:08 AMsst.Script
to help develop and debug scripts! (It's almost like a "deployment breakpoint")
I found for simple cases, converting to a function is just fine. But for more complex cases, where you need the script to succeed for the rest of the deployment to work, then you get very stuck and resort to commenting out a lot of code everywhere to get the environment in a place where you can use the awesomeness of live lambda development.
I'd love to be able to set a flag on a script that does the following on `sst start`:
• The function is deployed in live mode
• On deployment, when the script would normally be executed (by create or update), the deployment halts there! (Breakpoint)
• In "interactive mode", the function becomes live for local development immediately. You can invoke the lambda, change the code, do whatever you like (just like function live development)
• It gives you helpers, eg. print out an AWS CLI command to invoke the lambda the same way that it would be by cloud formation. Or some kind of console. So by default you can just execute it exactly as it normally would be done with the same params as in the stack code.
• You can at any point continue with deployment or rollback, (marking it as success or failed), and cloud formation continues appropriately
It would make working with scripts an absolute delight 🙂Slawomir Stec
11/23/2021, 6:05 AMRyan
11/23/2021, 6:14 AMSlawomir Stec
11/23/2021, 6:26 AMRyan
11/23/2021, 6:38 AMSlawomir Stec
11/23/2021, 6:50 AMSean Matheson
11/23/2021, 8:21 AMFrank
Frank
Frank
Ryan
11/23/2021, 11:39 PM