Then the “infra” package would just consume those ...
# general
j
Then the “infra” package would just consume those constructs and stitches everything in order to deploy the whole thing as a single stack.
f
Ah I see what u mean. Having constructs live with the Lambda code, and have the “infra” package merge all the constructs and genearate a stack out of it?
j
Yes exactly!
It couples the code with its deployment target a bit, but at least the infra package doesn’t have to know about all the specifics of each service.
(also we’re all in on AWS so I don’t mind having bits of infra in my packages lol)
f
Only downside I can see is that it’d be tricky for the constructs in services to share stuff between each other
j
I need to make a little audit about it, but I don’t think they’re sharing domain specific things
It’s often infrastructure interfaces coming from cdk itself