[{"data":1,"prerenderedAt":158},["ShallowReactive",2],{"pattern-eventbridge-custom-protobuf-python-sam":3,"pattern-group-eventbridge-custom-protobuf-python-sam":71},{"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":55,"stem":66,"testing":67,"videoId":6,"__hash__":70},"patterns\u002Fpatterns\u002Feventbridge-custom-protobuf-python-sam.json","Protobuf 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>scripts\u002Fgenerate.sh\u003C\u002Fcode>","\u003Ccode>sam build\u003C\u002Fcode>","\u003Ccode>sam deploy --guided --capabilities CAPABILITY_NAMED_IAM\u003C\u002Fcode>","Publish a Protobuf-encoded event to an Amazon EventBridge custom event bus with an AWS Glue Schema Registry, and deliver the decoded JSON to an AWS Lambda function.","json","AWS SAM",{"template":21},{"patternPath":22,"templateFile":23},"eventbridge-custom-protobuf\u002Fpython\u002Fsam","template.yaml",{"headline":25,"text":26},"How it works",[27,28,29],"This pattern shows how to publish a rich domain event, Protobuf-encoded, to an Amazon EventBridge custom event bus (the \u003Ccode>eventsv2\u003C\u002Fcode> API) using \u003Ccode>PutRawEvents\u003C\u002Fcode> together with an AWS Glue Schema Registry, and then deliver that same event to a Lambda subscriber.","The publisher encodes an \u003Ccode>OrderPlaced\u003C\u002Fcode> event from a \u003Ccode>.proto\u003C\u002Fcode> definition and wraps it in the Glue wire format (including the \u003Ccode>message-index\u003C\u002Fcode> that tells Glue which message type to decode as). EventBridge decodes the Protobuf against the Glue registry server-side and delivers the payload as plain JSON, so the consumer Lambda needs no Protobuf library and logs the event to CloudWatch. A matching \u003Ccode>orderId\u003C\u002Fcode>, fields, and metadata show the delivered event matches the published one.","This deploys one EventBridge custom event bus, one subscriber, an AWS Glue Schema Registry and Protobuf schema, one Python 3.14 Lambda function, an SQS dead-letter queue, and the delivery role.","Python","200",{},{"icon1":34,"icon2":39,"icon3":43,"line1":48,"line2":52},{"x":35,"y":36,"service":37,"label":38},18,30,"eventbridge","Amazon EventBridge\nCustom event bus",{"x":40,"y":36,"service":41,"label":42},85,"lambda-event-functions","AWS Lambda\nConsumer",{"x":44,"y":45,"service":46,"label":47},55,68,"glue","AWS Glue\nSchema Registry",{"from":49,"to":50,"label":51},"icon1","icon2","Decoded JSON",{"from":49,"to":53,"label":54},"icon3","schema",{"bullets":56},[57,60,63],{"text":58,"link":59},"Amazon EventBridge event buses","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-event-bus.html",{"text":61,"link":62},"AWS Glue Schema Registry","https:\u002F\u002Fdocs.aws.amazon.com\u002Fglue\u002Flatest\u002Fdg\u002Fschema-registry.html",{"text":64,"link":65},"Protocol Buffers documentation","https:\u002F\u002Fprotobuf.dev\u002F","patterns\u002Feventbridge-custom-protobuf-python-sam",{"text":68},[69],"See the GitHub repo for detailed testing instructions.","djperEdVmIM5tfoOvsknhnnDyIK3JpPsoWpSZibOUic",{"group":72,"pages":73,"overview":6},"eventbridge-custom-protobuf",[74,98],{"id":4,"title":5,"architectureURL":6,"cleanup":75,"contributors":77,"deploy":78,"description":17,"extension":18,"framework":19,"gitHub":80,"highlight":6,"introBox":82,"language":30,"level":31,"meta":84,"patternArch":85,"patternGroup":6,"patternGroupLabel":6,"resources":91,"stem":66,"testing":96,"videoId":6,"__hash__":70},{"text":76},[9],[11],{"text":79},[14,15,16],{"template":81},{"patternPath":22,"templateFile":23},{"headline":25,"text":83},[27,28,29],{},{"icon1":86,"icon2":87,"icon3":88,"line1":89,"line2":90},{"x":35,"y":36,"service":37,"label":38},{"x":40,"y":36,"service":41,"label":42},{"x":44,"y":45,"service":46,"label":47},{"from":49,"to":50,"label":51},{"from":49,"to":53,"label":54},{"bullets":92},[93,94,95],{"text":58,"link":59},{"text":61,"link":62},{"text":64,"link":65},{"text":97},[69],{"id":99,"title":100,"architectureURL":6,"cleanup":101,"contributors":104,"deploy":105,"description":110,"extension":18,"framework":19,"gitHub":111,"highlight":6,"introBox":114,"language":119,"level":31,"meta":120,"patternArch":121,"patternGroup":6,"patternGroupLabel":6,"resources":147,"stem":152,"testing":153,"videoId":6,"__hash__":157},"patterns\u002Fpatterns\u002Feventbridge-custom-protobuf-typescript-sam.json","Protobuf on an Amazon EventBridge Custom Event Bus",{"text":102},[103],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>",[11],{"text":106},[107,108,109],"npm install","sam build","sam deploy --guided --capabilities CAPABILITY_NAMED_IAM","Publish a Protobuf event to an Amazon EventBridge Custom Event Bus, decoded against an AWS Glue Schema Registry, and deliver it as JSON to AWS Lambda.",{"template":112},{"patternPath":113,"templateFile":23},"eventbridge-custom-protobuf\u002Ftypescript\u002Fsam",{"headline":25,"text":115},[116,117,118],"This pattern shows how to publish a rich domain event, Protobuf-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 from a `.proto` definition and wraps it in the AWS Glue wire format, including the message index that tells AWS Glue which message type to decode. Amazon EventBridge decodes the Protobuf against the AWS Glue registry server-side and delivers the payload as plain JSON, so the consumer AWS Lambda function needs no Protobuf 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 Protobuf schema, one Node.js 24 (TypeScript) AWS Lambda function, an Amazon SQS dead-letter queue, and the delivery role.","TypeScript",{},{"icon1":122,"icon2":126,"icon3":128,"icon4":131,"icon5":135,"line1":139,"line2":140,"line3":142,"line4":145},{"x":123,"y":124,"service":46,"label":125},8,50,"AWS Glue",{"x":127,"y":124,"service":37,"label":38},32,{"x":129,"y":36,"service":41,"label":130},67,"AWS Lambda",{"x":129,"y":132,"service":133,"label":134},70,"sqs","Amazon SQS DLQ",{"x":136,"y":36,"service":137,"label":138},88,"cloudwatch","Amazon\nCloudWatch",{"from":49,"to":50,"label":54},{"from":50,"to":53,"label":141},"JSON",{"from":50,"to":143,"label":144},"icon4","on failure",{"from":53,"to":146},"icon5",{"bullets":148},[149,150,151],{"text":58,"link":59},{"text":61,"link":62},{"text":64,"link":65},"patterns\u002Feventbridge-custom-protobuf-typescript-sam",{"text":154},[155,156],"Publish one Protobuf `OrderPlaced` event with `scripts\u002Frun_publish.sh \u003Cstack-name> \u003Cregion>`, then find the decoded JSON event in the consumer's Amazon CloudWatch logs. The script prints the exact log command for your stack.","See the GitHub repo for the commands and expected output.","wsRnd_5PYTfsLy557Flecp_4kI1gc79A1fRWMdh7BuI",1794652452023]