I need to get a collection of lambda function ARNs...
# typescript
m
I need to get a collection of lambda function ARNs using the aws-sdk (using promises) prior to executing my infrastructure as code. How do I go about ensuring my promises resolve prior to executing the Pulumi plan?
d
I guess you need await Promise.All(...your-list-of-promises); that way you should have them all another example, maybe more clear: await Promise.All([foo.promise(), bar.promise()]); hth
f
Another thing to keep in mind is that
Input<T> = T | Promise<T> | OutputInstance<T>;
So if you pass in the promise as an input at any point to a resource, the runtime will ensure the promise is resolved as part of constructing the resource
👍 1
m
Thanks for the advice!