[{"data":1,"prerenderedAt":58},["ShallowReactive",2],{"pattern-cdk-kinesis-poison-pill":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":28,"level":29,"meta":30,"patternArch":31,"resources":45,"s3URL":6,"services":6,"stem":53,"testing":54,"videoId":6,"__hash__":57},"patterns\u002Fpatterns\u002Fcdk-kinesis-poison-pill.json","Handling an Amazon Kinesis Poison Pill with an AWS Lambda Consumer",null,{"text":8},[9],"make destroy",[11],"content\u002Fcontributors\u002Fbenjamen-pyle.json",{"text":13},[14],"make deploy","Handle Kinesis Data Stream consumer failures to keep iterators healthy, retry recoverable errors, and abandon bad messages.","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fcdk-kinesis-poison-pill","serverless-patterns\u002Fcdk-kinesis-poison-pill","cdk-kinesis-poison-pill","lib\u002Fmain-stack.ts",{"headline":25,"text":26},"How it works",[27],"This pattern demonstrates how to handle a Lambda consumer failure when reading from a Kinesis Data Stream with CDK.  Without proper handling of failure when working with Kinesis Data Streams, an iterator will get stuck and the only way for the data to clear the stream is for it to **Age Out** beyond the trim horizon.  By leveraging OnFailure triggers when using CDK's KinesisEventSource, Lambda consumers will be more resiliant, less wasteful and allow downstreawm consumers to get events in the most timely manner possible.","Go","300",{},{"icon1":32,"icon2":37,"line1":41},{"x":33,"y":34,"service":35,"label":36},20,50,"kinesis-datastreams","Kinesis",{"x":38,"y":34,"service":39,"label":40},80,"lambda","Lambda",{"from":42,"to":43,"label":44},"icon1","icon2","",{"bullets":46},[47,50],{"text":48,"link":49},"AWS Using Lambda with Kinesis","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-kinesis.html",{"text":51,"link":52},"AWS Lambda Failure-Handling Features","https:\u002F\u002Fwww.amazonaws.cn\u002Fen\u002Fnew\u002F2019\u002Faws-lambda-supports-failure-handling-features-for-kinesis-and-dynamodb-event-sources\u002F","patterns\u002Fcdk-kinesis-poison-pill",{"text":55},[56],"See the GitHub repo for detailed testing instructions.","r0Pg-7fGfV7nAa5Wm6Vp4D9M5M7tOq-58KLQcecjg1w",1778846883621]