Thread
#typescript
    w

    wonderful-bird-78843

    4 months ago
    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.
    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

    4 months ago
    w

    wonderful-bird-78843

    4 months ago
    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

    4 months ago
    Hah it's fine 🙂 just tell your friends Pulumi is awesome
    w

    wonderful-bird-78843

    4 months ago
    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.