[{"data":1,"prerenderedAt":76},["ShallowReactive",2],{"pattern-iot-sqs-lambda-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":13,"deploy":15,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":28,"language":33,"level":34,"meta":35,"patternArch":36,"resources":55,"s3URL":6,"services":69,"stem":70,"testing":71,"videoId":32,"__hash__":75},"patterns\u002Fpatterns\u002Fiot-sqs-lambda-cdk.json","IoT rule to Amazon SQS queue to AWS Lambda ",null,{"headline":8,"text":9},"Cleanup",[10,11,12],"1. Delete the stack: \u003Ccode>npx cdk destroy\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>.","3. You see a message confirming DELETE_COMPLETE.",[14],"content\u002Fcontributors\u002Fpatrick-malatesta.json",{"text":16},[17],"cdk deploy","Create an IoT Rule with a SQS action and an AWS Lambda function.","json","AWS CDK",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"iot-sqs-lambda-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fiot-sqs-lambda-cdk","serverless-patterns\u002Fiot-sqs-lambda-cdk","iot_sqs_lambda_cdk\u002Fiot_sqs_lambda_cdk_stack.py",[],{"headline":29,"text":30,"test":32},"How it works",[31],"When a message is published to the IoT topic defined in the IoT Rule, this message will be delivered to the SQS standard queue. The Lambda function is configured with an event source mapping and it will be triggered to process the messages in the queue. In this sample the Lambda function extracts the body of the message polled from the SQS queue and logs its content.","","Python","200",{},{"icon1":37,"icon2":42,"icon3":46,"line1":50,"line2":53},{"x":38,"y":39,"service":40,"label":41},20,50,"iot","IoT",{"x":43,"y":39,"service":44,"label":45},60,"sqs","SQS",{"x":47,"y":39,"service":48,"label":49},85,"lambda","Lambda",{"from":51,"to":52,"label":32},"icon1","icon2",{"from":52,"to":54,"label":32},"icon3",{"bullets":56},[57,60,63,66],{"text":58,"link":59},"AWS IoT Core","https:\u002F\u002Fdocs.aws.amazon.com\u002Fiot\u002Flatest\u002Fdeveloperguide\u002Fwhat-is-aws-iot.html",{"text":61,"link":62},"AWS Lambda","https:\u002F\u002Faws.amazon.com\u002Fs3\u002F",{"text":64,"link":65},"Amazon Simple Queue Service","https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fwelcome.html",{"text":67,"link":68},"IoT Rule SQS action","https:\u002F\u002Fdocs.aws.amazon.com\u002Fiot\u002Flatest\u002Fdeveloperguide\u002Fsqs-rule-action.html",{"from":40,"to":44},"patterns\u002Fiot-sqs-lambda-cdk",{"headline":72,"text":73},"Testing",[74],"See the GitHub repo for detailed testing instructions.","wK7WL_Iqi14z9fV_cTriYqGDFrPluTq7dvOL0ZR_dVU",1778846885677]