[{"data":1,"prerenderedAt":101},["ShallowReactive",2],{"pattern-eventbridge-custom-bus-dynamodb-sam":3,"pattern-group-eventbridge-custom-bus-dynamodb-sam":75},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":23,"language":30,"level":31,"meta":32,"patternArch":33,"patternGroup":47,"patternGroupLabel":6,"resources":48,"stem":69,"testing":70,"videoId":6,"__hash__":74},"patterns\u002Fpatterns\u002Feventbridge-custom-bus-dynamodb-sam.json","Amazon EventBridge Custom Event Bus to Amazon DynamoDB",null,{"headline":8,"text":9},"Cleanup",[10],"From the pattern directory, delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[12],"content\u002Fcontributors\u002Fmarco-buss.json",{"text":14},[15],"sam deploy --guided","Write events from an EventBridge Custom Event Bus directly to DynamoDB with PutItem or BatchWriteItem universal targets, with no Lambda in the path.","json","AWS SAM",{"template":20},{"patternPath":21,"templateFile":22},"eventbridge-custom-bus-dynamodb\u002Fsam","template.yaml",{"headline":24,"text":25},"How it works",[26,27,28,29],"This pattern creates an Amazon EventBridge Custom Event Bus with two subscribers that write events to an Amazon DynamoDB table, with no Lambda function in the path. Each subscriber delivers to a universal target, a DynamoDB API action that EventBridge invokes directly, and a JSONata expression builds the request from the event.","Events are published with PutRawEvents and routed on the eventType metadata key. Events with eventType 'Order Placed' are written one at a time with PutItem. Events with eventType 'Order Imported' are collected into batches of up to 25 and written with a single BatchWriteItem call.","With the batch write, a duplicate ID in a batch or a throttled call fails the whole batch. EventBridge retries the batch and then writes one record to an Amazon SQS dead-letter queue listing the IDs of all events in it, so the dead-letter queue is essential for the batch subscriber.","This pattern deploys one EventBridge Custom Event Bus, two subscribers, one DynamoDB table, one SQS dead-letter queue, and one IAM role.","Integration","200",{},{"icon1":34,"icon2":39,"line1":43},{"x":35,"y":36,"service":37,"label":38},20,50,"eventbridge","Amazon EventBridge Custom Bus",{"x":40,"y":36,"service":41,"label":42},80,"dynamodb","Amazon DynamoDB",{"from":44,"to":45,"label":46},"icon1","icon2","Subscriber Universal Target","eventbridge-custom-bus-dynamodb",{"headline":49,"bullets":50},"Additional resources",[51,54,57,60,63,66],{"text":52,"link":53},"What is the EventBridge Custom Event Bus?","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-what-is.html",{"text":55,"link":56},"Universal targets for a Custom Event Bus","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-universal-targets.html",{"text":58,"link":59},"Subscribing to events on a Custom Event Bus","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-subscribers.html",{"text":61,"link":62},"Creating Custom Event Bus resources with CloudFormation","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-cloudformation.html",{"text":64,"link":65},"Retry policies and dead-letter queues for a Custom Event Bus","https:\u002F\u002Fdocs.aws.amazon.com\u002Feventbridge\u002Flatest\u002Fuserguide\u002Feb-custom-bus-retry.html",{"text":67,"link":68},"Amazon DynamoDB BatchWriteItem API reference","https:\u002F\u002Fdocs.aws.amazon.com\u002Famazondynamodb\u002Flatest\u002FAPIReference\u002FAPI_BatchWriteItem.html","patterns\u002Feventbridge-custom-bus-dynamodb-sam",{"headline":71,"text":72},"Testing",[73],"See the GitHub repo for detailed testing instructions.","qOcYygNYugGl3HgE2Za5whRBkjKGVO2VsXREjngJGbk",[76],{"id":4,"title":5,"architectureURL":6,"cleanup":77,"contributors":79,"deploy":80,"description":16,"extension":17,"framework":18,"gitHub":82,"highlight":6,"introBox":84,"language":30,"level":31,"meta":86,"patternArch":87,"patternGroup":47,"patternGroupLabel":6,"resources":91,"stem":69,"testing":99,"videoId":6,"__hash__":74},{"headline":8,"text":78},[10],[12],{"text":81},[15],{"template":83},{"patternPath":21,"templateFile":22},{"headline":24,"text":85},[26,27,28,29],{},{"icon1":88,"icon2":89,"line1":90},{"x":35,"y":36,"service":37,"label":38},{"x":40,"y":36,"service":41,"label":42},{"from":44,"to":45,"label":46},{"headline":49,"bullets":92},[93,94,95,96,97,98],{"text":52,"link":53},{"text":55,"link":56},{"text":58,"link":59},{"text":61,"link":62},{"text":64,"link":65},{"text":67,"link":68},{"headline":71,"text":100},[73],1792492481882]