EventBridge Pipes: Point-to-Point Event Streaming Without Code
Before EventBridge Pipes, connecting event sources to targets required Lambda functions for transformation. Now you can stream events directly with built-in filtering and transformation—no code required for common patterns.
What EventBridge Pipes Does
| Component | Purpose |
|---|---|
| Source | SQS, Kinesis, DynamoDB Streams, Kafka, MQ |
| Filter | Event pattern matching (optional) |
| Enrichment | Lambda, Step Functions, API Gateway (optional) |
| Target | Lambda, Step Functions, API Gateway, SNS, SQS, Kinesis |
Simple Pipe: DynamoDB to EventBridge
# CloudFormation: Stream DynamoDB changes to EventBridge
Resources:
OrderPipe:
Type: AWS::Pipes::Pipe
Properties:
Name: orders-to-eventbridge
Source: !GetAtt OrdersTable.StreamArn
SourceParameters:
DynamoDBStreamParameters:
StartingPosition: LATEST
BatchSize: 10
# Filter for new orders only
FilterCriteria:
Filters:
- Pattern: '{"eventName": ["INSERT"]}'
Target: !Sub arn:aws:events:${AWS::Region}:${AWS::AccountId}:event-bus/orders
TargetParameters:
EventBridgeEventBusParameters:
DetailType: OrderCreated
Source: orders.dynamodb
Pipe with Transformation
# Transform SQS messages before sending to API
Resources:
WebhookPipe:
Type: AWS::Pipes::Pipe
Properties:
Name: sqs-to-webhook
Source: !GetAtt IncomingQueue.Arn
SourceParameters:
SqsQueueParameters:
BatchSize: 1
# Built-in input transformation (no Lambda needed)
TargetParameters:
InputTemplate: |
{
"orderId": <$.body.orderId>,
"customer": <$.body.customerEmail>,
"timestamp": <$.attributes.SentTimestamp>
}
HttpParameters:
HeaderParameters:
Content-Type: application/json
Target: !Sub arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${WebhookApi}/*
Common Patterns
EventBridge Pipes Use Cases
- CDC replication: DynamoDB Streams → SQS for downstream processing
- Queue bridging: SQS → SNS for fan-out
- Real-time analytics: Kinesis → Firehose → S3
- Webhook delivery: SQS → HTTP endpoint
- Cross-account events: Kinesis → EventBridge in another account
Pipes vs Lambda vs EventBridge Rules
| Feature | Pipes | Lambda | EB Rules |
|---|---|---|---|
| Source types | Streams, queues | Anything | EventBridge only |
| Transformation | Built-in | Full code | Input transformer |
| Best for | Point-to-point | Complex logic | Fan-out |
EventBridge Pipes fills the gap between “simple rule” and “custom Lambda”. For straightforward integrations, it’s the right choice.
Stay in the loop
Get the latest wildlife research and conservation news delivered to your inbox.