[{"data":1,"prerenderedAt":71},["ShallowReactive",2],{"pattern-eventbridge-enrichment-with-lambda":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":35,"level":36,"meta":37,"patternArch":38,"resources":55,"s3URL":6,"services":6,"stem":66,"testing":67,"videoId":6,"__hash__":70},"patterns\u002Fpatterns\u002Feventbridge-enrichment-with-lambda.json","Amazon EventBridge event enrichment with AWS Lambda",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fdavid-boyne.json",{"text":13},[14],"cdk deploy","Enrich events with Lambda and put them back onto the event bus for downstream consumers","json","AWS CDK",{"template":19},{"projectFolder":20,"repoURL":21,"templateURL":22,"templateFile":23},"eventbridge-enrichment-with-lambda","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Feventbridge-enrichment-with-lambda","serverless-patterns\u002Feventbridge-enrichment-with-lambda","cdk\u002Flib\u002Fsingle-bus-enrichment-with-lambda.ts",{"headline":25,"text":26},"How it works",[27,28,29,30,31,32,33,34],"This pattern will produce events with enrichment flag. Enricher (Lambda function) picks up the event, enriches then puts the event back onto the bus. Downstream consumers get the enriched event","\u003Ch5>How the enrichment works\u003C\u002Fh5>","\u003Cimg width=\"100%\" src=\"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Fblob\u002Fmain\u002Feventbridge-enrichment-with-lambda\u002Fcdk\u002Fscreenshot.png?raw=true\" \u002F>","\u003Cul style=\"list-style-type: none;\">\u003Cli>1. Producer raise event and stores enrich:true into the metadata of the event.\u003C\u002Fli>\u003Cli>2. Event bus consumes event\u003C\u002Fli>\u003Cli>3. Rule is setup to listen to all events that need enriching (using the metadata field and EventBridge filters)\u003C\u002Fli>\u003Cli>4. Enricher takes event, strips of the enrichment flag, and continues to enrich event using the detailType as the key. The enricher is opinionated and knows how to enrich based on the event and schema of the event.\u003C\u002Fli>\u003Cli>5. Every downstream consumer acts as usual, but now they have to add a filter onto the rule that makes sure enrich:true is not set onto the event (downside of the pattern).\u003C\u002Fli>\u003C\u002Ful>","\u003Ca target=\"_blank\" href=\"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Feventbridge-enrichment-with-lambda\u002Fcdk\">Read more about this pattern\u003C\u002Fa>","\u003Chr \u002F>","\u003Ch5>Things to know\u003C\u002Fh5>","This pattern is an opinionated way to enrich data. Using event metadata with enrichment flags allows the rules to filter and process the events. The producer will need to add enrich onto the event and consumers will need to create rules ignoring this field.","TypeScript","200",{},{"icon1":39,"icon2":44,"icon3":47,"line1":49,"line2":53},{"x":40,"y":41,"service":42,"label":43},20,50,"eventbridge","Amazon EventBridge",{"x":41,"y":41,"service":45,"label":46},"lambda","AWS Lambda",{"x":48,"y":41,"service":42,"label":43},80,{"from":50,"to":51,"label":52},"icon1","icon2","",{"from":51,"to":54,"label":52},"icon3",{"bullets":56},[57,60,63],{"text":58,"link":59},"Enriching Amazon EventBridge events with AWS Lambda","https:\u002F\u002Fwww.boyney.io\u002Fblog\u002F2022-11-01-eventbridge-enrichment-with-lambda",{"text":61,"link":62},"Content enricher messaging pattern","https:\u002F\u002Fwww.enterpriseintegrationpatterns.com\u002FDataEnricher.html",{"text":64,"link":65},"Understanding event payload standards with EventBridge","https:\u002F\u002Fwww.boyney.io\u002Fblog\u002F2022-02-11-event-payload-patterns","patterns\u002Feventbridge-enrichment-with-lambda",{"text":68},[69],"See the GitHub repo for detailed testing instructions.","ivJv2yMi_tDhuq28L1lAYxj6ZrURB6sQveMy8EQNPuI",1780050907360]