[{"data":1,"prerenderedAt":77},["ShallowReactive",2],{"pattern-cdk-closed-loop-serverless-control-pattern":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":30,"level":31,"meta":32,"patternArch":33,"resources":60,"s3URL":6,"services":71,"stem":72,"testing":73,"videoId":6,"__hash__":76},"patterns\u002Fpatterns\u002Fcdk-closed-loop-serverless-control-pattern.json","Amazon EventBridge to AWS Lambda with feedback control by Amazon CloudWatch Alarms",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Femir-ayar.json",{"text":13},[14],"cdk deploy","Create a closed-Loop (feedback) control mechanism for throttle-handling of 3rd party calls on AWS Lambda with Amazon CloudWatch Alarms and Amazon EventBridge","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fcdk-closed-loop-serverless-control","serverless-patterns\u002Fcdk-closed-loop-serverless-control","cdk-closed-loop-serverless-control\u002Fcdk","lib\u002Fcdk-serverless-control-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29],"This sample project demonstrates an ON\u002FOFF control implementation on AWS Lambda with a closed-loop (feedback) control mechanism. This is useful when your application is dependent on third-party calls and you need to handle any throttling or a performance issue on the third-party service.","Using the feedback control mechanism, AWS Lambda performs the third-party call and uses Amazon CloudWatch custom metrics feature to store call metrics like response time and status code. This pattern deploys two AWS Lambda functions, one Amazon EventBridge rule, two Amazon CloudWatch alarms and one Amazon CloudWatch composite alarm.","A set of CloudWatch Alarms monitors these custom metrics produced after the third-party call and decides if the third-party service call is healty. If not, the event planner Lambda function stops feeding messages to EventBridge to drop third-party calls temporarly to avoid additional load on the third-party service. It also brings cost benefits and concurrency savings on AWS Lambda by avoiding the lambda invocations for the unhealthy 3rd party service.","TypeScript","400",{},{"icon0":34,"icon1":38,"icon2":42,"icon3":45,"icon4":47,"line0":49,"line1":53,"line2":55,"line3":57},{"x":35,"y":36,"service":37,"label":37},0,50,"",{"x":39,"y":36,"service":40,"label":41},20,"lambda","AWS Lambda",{"x":36,"y":36,"service":43,"label":44},"eventbridge","Amazon EventBridge",{"x":46,"y":36,"service":40,"label":41},80,{"x":48,"y":36,"service":37,"label":37},100,{"from":50,"to":51,"label":52},"icon0","icon1","input",{"from":51,"to":54,"label":37},"icon2",{"from":54,"to":56,"label":37},"icon3",{"from":56,"to":58,"label":59},"icon4","output",{"bullets":61},[62,65,68],{"text":63,"link":64},"Using Amazon CloudWatch alarms","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudWatch\u002Flatest\u002Fmonitoring\u002FAlarmThatSendsEmail.html",{"text":66,"link":67},"Amazon CloudWatch - Publishing custom metrics","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudWatch\u002Flatest\u002Fmonitoring\u002FpublishingMetrics.html",{"text":69,"link":70},"Amazon EventBridge features","https:\u002F\u002Faws.amazon.com\u002Feventbridge\u002Ffeatures\u002F",{"from":40,"to":43},"patterns\u002Fcdk-closed-loop-serverless-control-pattern",{"text":74},[75],"See README.md file in the GitHub repo for detailed testing instructions.","ow_ZZIkTuJuMP1bJtmBWLg6YJEQbLxpGlQAKkwel3i0",1779186908631]