Hello all, fairly new to sst, and our primary appl...
# help
w
Hello all, fairly new to sst, and our primary applications are IoT based, so lots of reliance on mqtt. Wondering if anybody is integrating with either MQ, or, the mqtt broker in iotcore, and using sst functions as handlers for their respective events? Seems like there's really solid support for SQS, with multiple constructs such as Queue and Topic, so, just wondering how much of a lift this is going to be for us, were we to also utilize sst for the device to cloud paths. We're having very good experience with API, kinesis, auth, but those are all to support data wrangling and client api's, so now we're considering the deeper layers. Thanks for any insights and pointers.
t
Don't have any experience using sst.Functions in exactly that setup but it should work fine from what I know. Ultimately an sst.Function is just a normal lambda function so anywhere in CDK that supports lambdas everything should "just work"
w
Thanks, @thdxr. So, I'd import the existing resource using CDK, then create a Function resource, so that I could associate it to my imported MQ or IoTCore broker as an event handler, using the CDK api's, correct? Pardon my newbness; I'm just getting my head wrapped around how this all works between stacks, functions, etc. Thanks
f
Hey @William Hatch, do you have Lambda functions hooked up to MQ currently? • if you do, moving that over to SST would be a lift and shift. So importing ur existing MQ and re-creating the Lambdas in SST • if you don’t, you can glance over this tutorial on how it’d be like setting that up manually. And you’d just need to convert that in SST. Also importing ur existing MQ and creating the Lambdas in SST https://awsfeed.com/whats-new/compute/using-amazon-mq-as-an-event-source-for-aws-lambda
@thdxr and I are more than happy to help u out when you get around to implement this.
w
Thanks @Frank Functions currently do not exist, and your link is timely as I'm just beginning to do this now. I may have questions, and, once we got it working, I'm happy to write up a nice tutorial, or docs, whatever. Happy to help in any way we can. Thanks again!
f
Awesome! Keep us posted!
w
Hmm, so, I'm stuck at how to proceed. I have an existing Amazon MQ stack, created with terraform. I prefer divorcing the dev ops and IAC side of things, and I know that's a subjective opinion not shared by many lol. So, the issue I'm running into is that the CDK constructs for both Amazon MQ, and IoT Core, lack the I... resources where we can get a reference to an existing resource. I'm not by any means close to an expert on CDK, but having done the kinesis stream handler, which does have the streamFromArn... type methods, I'm noticing that neither MQ or any of the IoT Core constructs seem to have these. I'm not sure what to do next. Thanks @Frank