Adrián Mouly
11/04/2021, 4:50 AMMike McCall
11/04/2021, 12:40 PMOmi Chowdhury
11/04/2021, 1:12 PMOmi Chowdhury
11/04/2021, 1:16 PMthdxr
11/04/2021, 1:33 PM<stage>/DYNAMO_TABLE=<arn>
and my core library loads all of that so the functions don't need any env vars passed in or need to be aware of what they're going to use.
My functions do call "blackbox" library functions like User.create
- they have no idea if that's writing to dynamo, queue, eventbridge, etc. But because the config is available it doesn't matter here. Think of the config as "service discovery".
Where it does matter is permissions - this is where the coupling really shows up. If you create a new lambda function calling a blackbox User.create
- you don't know what permissions you need to grant it.
What I've been doing for now is granting permissions globally across all functions. I know this isn't best practice but I only have a few of these - usually dynamo + EB. Pretty much every function needs access to these anyway but from a purist pov it's not good practice. But I prefer the benefits of DDD (hiding implementation details) over the loss in securityAdrián Mouly
11/04/2021, 1:35 PMAdrián Mouly
11/04/2021, 1:35 PMSimon Reilly
11/04/2021, 1:37 PMthdxr
11/04/2021, 1:38 PMUsers.import(csv)
as a complex step function. Where would you put the lambda handlers for those steps. Gets trickyMike McCall
11/04/2021, 1:42 PMMike McCall
11/04/2021, 1:43 PMMike McCall
11/04/2021, 1:46 PMthdxr
11/04/2021, 1:47 PMapi
that suffers the most from this. That's what synthesizes things between domainsthdxr
11/04/2021, 1:47 PMMike McCall
11/04/2021, 1:55 PMAdrián Mouly
11/04/2021, 1:59 PMDerek Kershner
11/04/2021, 8:17 PMAdrián Mouly
11/04/2021, 8:25 PMAdrián Mouly
11/04/2021, 8:25 PMDerek Kershner
11/04/2021, 8:27 PM