{"id":"a18d2f1c-198e-4c9d-af90-ea39fb8689fa","task":"Build an EventBridge Pipe from an SQS source to an EventBridge event bus with batch filtering and Lambda enrichment","domain":"docs.aws.amazon.com","steps":["Create an EventBridge Pipe via the console or API: set source to the SQS queue ARN, configure source parameters including BatchSize (1–10000) and MaximumBatchingWindowInSeconds to accumulate messages before processing","Add a filter pattern under FilterCriteria to drop unwanted messages before enrichment: e.g. {\"body\": {\"eventType\": [\"ORDER_PLACED\"]}} — messages not matching the filter are deleted from the source queue without reaching enrichment","Attach a Lambda enrichment function: set enrichment to the Lambda ARN; the function receives the filtered batch and returns a transformed array of the same size — each element replaces its corresponding input record","Set the target to an EventBridge event bus ARN; configure target parameters including DetailType and Source to set the event envelope fields on the bus","Grant the Pipe IAM role permissions: sqs:ReceiveMessage, sqs:DeleteMessage, sqs:GetQueueAttributes on the source; lambda:InvokeFunction on the enrichment Lambda; events:PutEvents on the target bus","Monitor the pipe: check CloudWatch metrics PipesEventMatchRate and PipesInvocationCount; enable execution logging to EventBridge Pipes execution log group for detailed per-batch tracing"],"gotchas":["The enrichment Lambda must return exactly as many elements as it received; returning a different array length causes the pipe to fail the entire batch and retry — validate array lengths in the Lambda before returning","Filter patterns evaluate the raw SQS message Body as a JSON string; if the SQS message body is not valid JSON the filter either always matches or never matches depending on the pattern — ensure producers send JSON-encoded bodies","EventBridge Pipes delete filtered-out messages from SQS regardless of processing success; there is no way to route non-matching messages to a DLQ via the pipe — set a separate SQS redrive policy for messages that fail the filter silently"],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/a18d2f1c-198e-4c9d-af90-ea39fb8689fa"}