https://pulumi.com logo
#aws
Title
# aws
e

early-keyboard-41388

10/21/2021, 11:58 AM
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

crooked-pillow-11944

10/21/2021, 12:14 PM
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

early-keyboard-41388

10/21/2021, 1:00 PM
@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

crooked-pillow-11944

10/21/2021, 1:05 PM
Personally I use API Gateway when layering functions like this. Thilat way it's explicit what I'm trying to accomplish.