[{"data":1,"prerenderedAt":65},["ShallowReactive",2],{"pattern-iot-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":49,"s3URL":6,"services":58,"stem":59,"testing":60,"videoId":32,"__hash__":64},"patterns\u002Fpatterns\u002Fiot-lambda-cdk.json","IoT rule 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\u002Fshehryar-abbasi.json",{"text":16},[17],"cdk deploy","Invoke a Lambda function from an IoT rule","json","AWS CDK",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"iot-lambda-cdk","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fiot-lambda-cdk","serverless-patterns\u002Fiot-lambda-cdk","cdk\u002Fapp.py",[],{"headline":29,"text":30,"test":32},"How it works",[31],"When an IoT event is sent to an IoT topic, a Lambda function is invoked. This pattern configures a Lambda function to poll this event. The function is invoked with a payload containing the contents of the message event.","","Python","200",{},{"icon1":37,"icon2":42,"line1":46},{"x":38,"y":39,"service":40,"label":41},20,50,"iot","IoT",{"x":43,"y":39,"service":44,"label":45},80,"lambda","AWS Lambda",{"from":47,"to":48,"label":32},"icon1","icon2",{"headline":50,"bullets":51},"Additional resources",[52,55],{"text":53,"link":54},"Managing backend requests and frontend notifications in serverless web apps","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fmanaging-backend-requests-and-frontend-notifications-in-serverless-web-apps\u002F",{"text":56,"link":57},"Building serverless applications with streaming data","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbuilding-serverless-applications-with-streaming-data-part-1\u002F",{"from":40,"to":44},"patterns\u002Fiot-lambda-cdk",{"headline":61,"text":62},"Testing",[63],"See the GitHub repo for detailed testing instructions.","Ts8HSfAZlnt_qfLS0KyYlYIltoZnI683W46oKRb7Nds",1778846885610]