Ross Coundon
05/10/2021, 4:01 PMsst start to running it just in the cloud?
At the moment, if I do
sst deploy
Fire off some requests
sst start
Debug some requests
Then I kill sst start
Any future requests fail with the error
Error: Debug client not connected.
Is the only way to do this to run another sst deploy ?Pål Brattberg
05/10/2021, 4:21 PMsst deploy Deploy pushes the 'correct' handler to AWS, while sst start pushes the sst proxy to AWS that will redirect all calls to your local machine.
If you don't call sst deploy after sst start you are just leaving the proxy running on AWS.
Personally I have a rule never to run sst start in production, only in dev/staging and these are also separate AWS accounts (managed by https://github.com/99designs/aws-vault)Frank
sst deploy to deploy the real handlers.Ross Coundon
05/10/2021, 8:32 PMFrank
Frank
sst start, it automatically flips back and deploy the real lambdas.Frank
Ross Coundon
05/10/2021, 8:54 PMSimon Reilly
05/11/2021, 8:08 AMnpx sst stop to do this. I wonder if that would be a useful utility anyway, as their may be an eventual unhandled error e.g. npx sst start has been running for over 1 hour on an assumed iam permission that expired after 1 hour, so the default shutdown fails due to AWS permissions.Frank
Frank
sst deploy after to manually deploy it.Frank
sst start re-runs sst deploy to deploy the real Lambdas, but the solution didn’t feel elegant after using it. It doesn’t provide much value over user hitting ctrl-c and runs sst deploy manually.
I’m going to keep working on this on the side to find a better/faster way to flip between stub/real Lambda functions that doesn’t require a full sst deploy prcocess.
For now, I added a warning msg in v0.19.0 that reminds ppl to run sst deploy to deploy the latest changes after they quit sst start.