sst / sst

Build modern full-stack applications on AWS

Home Page:https://sst.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource Binding for multiple Lambda Functions

MartinLoeper opened this issue · comments

I just noticed that lambda types are generated only once in the .sst folder for all lambda functions in our project.

I would expect to see separate types for each lambda because we bind different resources to the respective functions.

Is this intended our is something misconfigured in our project?

commented

Hmm is there an issue you are running into?

No, its just a conceptional question as while I'm coding one particular lambda function, the typescript type definitions suggest an environment variable is available whereas it is not available because it was bound to another function. This gives a false sense of security when one of our devs forgets to check the actual bindings in the infrastructure part. So its more like a maintenance issue than a functional one.

Thus I am asking whether I set it up wrong or this case was not taken into consideration yet.
If it is intended, I think a quick note in the Resource Binding docs would be nice to raise awareness.
Anyway, thanks for your quick response Jay! Love your work here!