Need to understand SST Architecture: Problem: So I...
# help
m
Need to understand SST Architecture: Problem: So I created one example lambda function on main.go file. I understand sst is creating some kind of 'stub lambda' for this. So after deploying (running sst start/ sst deploy) where can I find the actual code on aws ? 1. What is the stub lambda ? 2. what is the websocket connection for this? 3. How can we get the actual function on aws console ? ( https://docs.serverless-stack.com/live-lambda-development )
f
what is the websocket connection for this?
When u run
sst start
, SST deploys a debug stack into ur account first before deploying ur app. And the debug stack contains an API Gateway WebSocket API.
What is the stub lambda ?
After the debug stack finishes deploying, u app will be deployed, except that the function code for each Lambda function are replaced by stub code. (the same Lambda function name, just the code is replaced). When a function is invoked, the stub code will forward the request to ur local through the WebSocket API deployed in the debug stack.
How can we get the actual function on aws console ?
Stop
sst start
and then run
sst deploy
, ur real code will get deployed.
k
@Mohiuddin Sumon This nice things about the stub is that it practically gives you a "live reload", while making sure the real lambda permissions can be tested while developing locally.