[{"data":1,"prerenderedAt":86},["ShallowReactive",2],{"pattern-eventbridge-custom-protobuf-typescript-sam":3,"pattern-group-eventbridge-custom-protobuf-typescript-sam":85},{"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__":84},"patterns\u002Fpatterns\u002Feventbridge-custom-protobuf-typescript-sam.json","Protobuf on an Amazon EventBridge Custom Event Bus",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fkurt-tometich.json",{"text":13},[14,15,16],"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.","json","AWS SAM",{"template":21},{"patternPath":22,"templateFile":23},"eventbridge-custom-protobuf\u002Ftypescript\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 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","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},8,50,"glue","AWS Glue",{"x":40,"y":36,"service":41,"label":42},32,"eventbridge","Amazon EventBridge",{"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},"Protocol Buffers documentation","https:\u002F\u002Fprotobuf.dev\u002F","patterns\u002Feventbridge-custom-protobuf-typescript-sam",{"text":81},[82,83],"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.","ulHIb32VDch6aUf65o-PjR-6sh0zHmurtt4JtzG__do",[],1794479667088]