This is the outcome in the gateway when using the ...
# help
a
This is the outcome in the gateway when using the same handler on 4 routes. Is it expected to create 4 integrations?
b
Yea, since each route can be individually configured. If you just want 1 Lambda/integration you can create a new
Function
and use that for the routes.
a
thanks, I will do that
I checked again, I am actually doing that
Copy code
this.requestHandler = new sst.Function(this, "HttpHandler", {
      handler: "src/service/httpRequestsHandler.handler",
      environment: {
        ...props.sharedEnvVars,
        ...props.httpHandler.environment,
      },
    });
and i am just passing it
Copy code
"GET /notes": this.handler
i am gettign the same effect if i do
Copy code
"GET /notes": {
      authorizer: "none",
      function: this.requestHandler
    }
t
The integration is the connection between the route and the function so 1 per route is normal
a
Makes sense, it was more if it's intended behavior. I use the same lambda with internal routing. Many thanks! Have a great day!