Hey, is there any recommended practice or way to m...
# aws
e
Hey, is there any recommended practice or way to make lambda to lambda calls (in different microservices)? I’m using the
aws-sdk
, with the
lambda.invoke
, my main doubt is with the naming for the other lambda, as Pulumi adds extra numbering to the name. Maybe something on the
pulumi up
process to add in the lambda’s env data or any other option?
c
This is what environment variables are for. I use stack references to refer to other AWS services. If both lambdas are in the same stack you could just refer directly.
e
@crooked-pillow-11944 thanks for the reply! But what if you have several lambdas from all different services. You’ll add each one to env variables? I didn’t thought of env variables as to save a reference to another function, seems strange to me. But if I can’t find another approach, I’ll probably follow your advise (I have it currently working with your advise).
c
Personally I use API Gateway when layering functions like this. Thilat way it's explicit what I'm trying to accomplish.