5 ms·
> How, for example, do you connect to a Postgres database from Lambda/Cloud Functions? Exactly the same way you would with an EC2 instance...
by all_blue_chucks 8y ago
> How, for example, do you connect to a Postgres database from Lambda/Cloud Functions?
Exactly the same way you would with an EC2 instance...
- tango12 8y agoMight not be that easy because only postgres can take a few hundreds of connections which won't work out if you have a few thousands of serverless functions? No persistent connection pools.
- somebodythere 8y agoWell, just put the connection logic outside of the main handler so it's shared between invocations! Wait, oops, you have state now.
- rhlsthrm 8y agoRealistically could you do this with Redis or something similar? Not sure about security implications of this though...
- GordonS 8y agoHow do you handle database connection pooling?