https://pulumi.com logo
#typescript
Title
# typescript
w

wonderful-bird-78843

06/26/2022, 9:54 PM
Hey awesome Pulumi people! 👋 I'd really like to set a specific provider (so I can specify a region) for a aws.lambda.CallBackFunction, but that doesn't seem to be allowed? Am I holding it wrong?
Copy code
requestsSns.onEvent(`foo-runner-${region}`, new aws.lambda.CallbackFunction(`foo-runner-func-${region}`, {
    callback: async (ev, ctx) => { ... },
    runtime: "nodejs14.x",
    provider: provider,
}));
On first glance, you might think it would just pick the same provider as the SNS queue, but it's perfectly legit to have lambda functions in one regions triggered by an SNS queue in another region?
b

billowy-army-68599

06/26/2022, 10:25 PM
@wonderful-bird-78843 you provider is in the wrong place:
Copy code
new aws.lambda.CallbackFunction(`foo-runner-func`, {,
    runtime: "nodejs14.x",
}, { provider: provider });
w

wonderful-bird-78843

06/26/2022, 10:26 PM
Aha! I'm not sure what's going on with the comma after the
{
there? is it :
Copy code
CallBackFunction(string, object, object?)
Thank you!
b

billowy-army-68599

06/26/2022, 10:32 PM
yep!
w

wonderful-bird-78843

06/26/2022, 10:35 PM
Thanks again for amazing support 🙂
3 Views