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

wonderful-bird-78843

05/01/2022, 6:59 PM
Is there an obvious way to use a pulumi.Output in a callback function that's going to be serialized? I've tried all sorts of manipulations with apply/etc.
Copy code
const requestsSns = new aws.sns.Topic("mcurl-sns-requests");

const mcurlHandler = new aws.lambda.CallbackFunction("mcurl-handler", {
    callback: async (ev, ctx) => {
        const snsClient = new SNSClient({ region: region });
        var msg = {}
        var msgString = JSON.stringify(msg);
        var params = {
            Message: msgString, 
            TopicArn: requestsSns.arn,    <--------
        };
        try {
e

echoing-dinner-19531

05/01/2022, 7:11 PM
w

wonderful-bird-78843

05/01/2022, 7:11 PM
omg. thank you!
Seriously, hours of my time saved, thank you! Pulumi is amazing 🙂
if you've got a kofi or something let me know, I'll buy you your beverage of choice!
e

echoing-dinner-19531

05/01/2022, 7:40 PM
Hah it's fine 🙂 just tell your friends Pulumi is awesome
w

wonderful-bird-78843

05/01/2022, 7:41 PM
I've been doing so! Currently doing a hackathon project, rewrote into Pulumi after I realized you couldn't loop over aws regions in terraform.
4 Views