[{"data":1,"prerenderedAt":198},["ShallowReactive",2],{"pattern-eventbridge-custom-avro-typescript-sam":3,"pattern-group-eventbridge-custom-avro-typescript-sam":84},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":24,"language":30,"level":31,"meta":32,"patternArch":33,"patternGroup":6,"patternGroupLabel":6,"resources":68,"stem":79,"testing":80,"videoId":6,"__hash__":83},"patterns\u002Fpatterns\u002Feventbridge-custom-avro-typescript-sam.json","Avro on an Amazon EventBridge Custom Event Bus",null,{"text":8},[9],"\u003Ccode>sam delete\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fkurt-tometich.json",{"text":13},[14,15,16],"\u003Ccode>npm install\u003C\u002Fcode>","\u003Ccode>sam build\u003C\u002Fcode>","\u003Ccode>sam deploy --guided --capabilities CAPABILITY_NAMED_IAM\u003C\u002Fcode>","Publish an Avro event to an Amazon EventBridge custom event bus, decoded against an AWS Glue Schema Registry, and deliver it as JSON to AWS Lambda.","json","AWS SAM",{"template":21},{"patternPath":22,"templateFile":23},"eventbridge-custom-avro\u002Ftypescript\u002Fsam","template.yaml",{"headline":25,"text":26},"How it works",[27,28,29],"This pattern shows how to publish a rich domain event, Avro-encoded, to an Amazon EventBridge custom event bus (the eventsv2 API) using `PutRawEvents` together with an AWS Glue Schema Registry, and then deliver that same event to an AWS Lambda subscriber.","The publisher encodes an `OrderPlaced` event against an Avro schema and wraps it in the AWS Glue wire format. Amazon EventBridge decodes the Avro against the AWS Glue registry server-side and delivers the payload as plain JSON, so the consumer AWS Lambda function needs no Avro library and simply logs the event to Amazon CloudWatch. A matching `orderId`, fields, and metadata prove the delivered event equals the one that was published.","This deploys one Amazon EventBridge custom event bus, one subscriber, an AWS Glue Schema Registry and Avro schema, one Node.js (TypeScript) AWS Lambda function, an Amazon SQS dead-letter queue, and the delivery role.","TypeScript","200",{},{"icon1":34,"icon2":39,"icon3":43,"icon4":48,"icon5":52,"line1":56,"line2":60,"line3":63,"line4":66},{"x":35,"y":36,"service":37,"label":38},10,50,"glue","AWS Glue",{"x":40,"y":36,"service":41,"label":42},32,"eventbridge","Amazon EventBridge\nCustom event bus",{"x":44,"y":45,"service":46,"label":47},67,30,"lambda-event-functions","AWS Lambda",{"x":44,"y":49,"service":50,"label":51},70,"sqs","Amazon SQS DLQ",{"x":53,"y":45,"service":54,"label":55},88,"cloudwatch","Amazon\nCloudWatch",{"from":57,"to":58,"label":59},"icon1","icon2","schema",{"from":58,"to":61,"label":62},"icon3","JSON",{"from":58,"to":64,"label":65},"icon4","on failure",{"from":61,"to":67},"icon5",{"bullets":69},[70,73,76],{"text":71,"link":72},"Amazon EventBridge event buses","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-event-bus.html",{"text":74,"link":75},"AWS Glue Schema Registry","https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fschema-registry.html",{"text":77,"link":78},"Apache Avro specification","https:\u002F\u002Favro.apache.org\u002Fdocs\u002F","patterns\u002Feventbridge-custom-avro-typescript-sam",{"text":81},[82],"See the GitHub repo for detailed testing instructions.","lOb23WnkFa2FD6hBOEEYYJ57faqRjRCKZUhLndGG07E",{"group":85,"pages":86,"overview":6},"eventbridge-custom-avro",[87,129,170],{"id":88,"title":5,"architectureURL":6,"cleanup":89,"contributors":92,"deploy":93,"description":97,"extension":18,"framework":19,"gitHub":98,"highlight":6,"introBox":101,"language":106,"level":31,"meta":107,"patternArch":108,"patternGroup":85,"patternGroupLabel":6,"resources":120,"stem":125,"testing":126,"videoId":6,"__hash__":128},"patterns\u002Fpatterns\u002Feventbridge-custom-avro-java-sam.json",{"text":90},[91],"sam delete",[11],{"text":94},[95,96],"sam build","sam deploy --guided --capabilities CAPABILITY_NAMED_IAM","Publishes an Avro-encoded event to an Amazon EventBridge custom event bus with an AWS Glue Schema Registry and delivers the decoded JSON to an AWS Lambda function",{"template":99},{"patternPath":100,"templateFile":23},"eventbridge-custom-avro\u002Fjava\u002Fsam",{"headline":25,"text":102},[103,104,105],"This pattern shows how to publish a rich domain event, Avro-encoded, to an Amazon EventBridge custom event bus (the eventsv2 API) using PutRawEvents together with an AWS Glue Schema Registry, and then deliver that same event to an AWS Lambda subscriber.","The publisher encodes an OrderPlaced event against an Avro schema and wraps it in the AWS Glue wire format. Amazon EventBridge decodes the Avro against the AWS Glue registry server-side and delivers the payload as plain JSON, so the consumer AWS Lambda function needs no Avro library and simply logs the event to Amazon CloudWatch. A matching orderId, fields, and metadata prove the delivered event equals the one that was published.","This deploys one Amazon EventBridge custom event bus, one subscriber, an AWS Glue Schema Registry and Avro schema, one Java 21 AWS Lambda function, an Amazon SQS dead-letter queue, and the delivery role.","Java",{},{"icon1":109,"icon2":111,"icon3":114,"line1":116,"line2":118},{"x":110,"y":36,"service":41,"label":42},20,{"x":112,"y":36,"service":37,"label":113},55,"AWS Glue Schema",{"x":115,"y":36,"service":46,"label":47},85,{"from":57,"to":58,"label":117},"AVRO-encoded data",{"from":58,"to":61,"label":119},"Decoded JSON",{"bullets":121},[122,123,124],{"text":71,"link":72},{"text":74,"link":75},{"text":77,"link":78},"patterns\u002Feventbridge-custom-avro-java-sam",{"text":127},[82],"6qZvCd7ISXz-xLHAYjehq1atazsB3Guawn6dI2_grIk",{"id":130,"title":5,"architectureURL":6,"cleanup":131,"contributors":135,"deploy":136,"description":17,"extension":18,"framework":19,"gitHub":138,"highlight":6,"introBox":141,"language":144,"level":31,"meta":145,"patternArch":146,"patternGroup":85,"patternGroupLabel":6,"resources":158,"stem":163,"testing":164,"videoId":6,"__hash__":169},"patterns\u002Fpatterns\u002Feventbridge-custom-avro-python-sam.json",{"text":132},[133,134],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.","Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[11],{"text":137},[95,96],{"template":139},{"patternPath":140,"templateFile":23},"eventbridge-custom-avro\u002Fpython\u002Fsam",{"headline":25,"text":142},[27,28,143],"This deploys one Amazon EventBridge custom event bus, one subscriber, an AWS Glue Schema Registry and Avro schema, one Python 3.14 AWS Lambda function, an Amazon SQS dead-letter queue, and the delivery role.","Python",{},{"icon1":147,"icon2":149,"icon3":150,"icon4":151,"icon5":152,"line1":154,"line2":155,"line3":156,"line4":157},{"x":148,"y":36,"service":37,"label":38},8,{"x":40,"y":36,"service":41,"label":42},{"x":44,"y":45,"service":46,"label":47},{"x":44,"y":49,"service":50,"label":51},{"x":53,"y":45,"service":54,"label":153},"Amazon CloudWatch",{"from":57,"to":58,"label":59},{"from":58,"to":61,"label":62},{"from":58,"to":64,"label":65},{"from":61,"to":67},{"bullets":159},[160,161,162],{"text":71,"link":72},{"text":74,"link":75},{"text":77,"link":78},"patterns\u002Feventbridge-custom-avro-python-sam",{"text":165},[166,167,168,82],"Install the publisher dependencies: `python3 -m venv .venv && .\u002F.venv\u002Fbin\u002Fpip install -r publisher\u002Frequirements.txt`","Publish one Avro `OrderPlaced` event: `scripts\u002Frun_publish.sh \u003Cstack-name> \u003Cregion>`","View the delivered event: `aws logs tail \u002Faws\u002Flambda\u002Favro-orders-consumer --since 5m --format short`","UI8iTfI_P71_S44_wHTPdDjjfzYJ46-XWH_9bEBOGsc",{"id":4,"title":5,"architectureURL":6,"cleanup":171,"contributors":173,"deploy":174,"description":17,"extension":18,"framework":19,"gitHub":176,"highlight":6,"introBox":178,"language":30,"level":31,"meta":180,"patternArch":181,"patternGroup":6,"patternGroupLabel":6,"resources":191,"stem":79,"testing":196,"videoId":6,"__hash__":83},{"text":172},[9],[11],{"text":175},[14,15,16],{"template":177},{"patternPath":22,"templateFile":23},{"headline":25,"text":179},[27,28,29],{},{"icon1":182,"icon2":183,"icon3":184,"icon4":185,"icon5":186,"line1":187,"line2":188,"line3":189,"line4":190},{"x":35,"y":36,"service":37,"label":38},{"x":40,"y":36,"service":41,"label":42},{"x":44,"y":45,"service":46,"label":47},{"x":44,"y":49,"service":50,"label":51},{"x":53,"y":45,"service":54,"label":55},{"from":57,"to":58,"label":59},{"from":58,"to":61,"label":62},{"from":58,"to":64,"label":65},{"from":61,"to":67},{"bullets":192},[193,194,195],{"text":71,"link":72},{"text":74,"link":75},{"text":77,"link":78},{"text":197},[82],1795189150833]