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
Known 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
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp