EventBridge Pipe Deployer
What this skill does
Provisions production-grade Amazon EventBridge Pipes connecting a
streaming or polling source to a downstream target with secure
defaults: source selection (DynamoDB Streams, Kinesis, SQS, MSK,
Amazon MQ, self-managed Kafka), optional filter pattern, optional
enrichment (Lambda, Step Functions, API Gateway, API Destination),
target selection (Lambda, Step Functions, EventBridge bus, SQS, SNS,
ECS, API Gateway, API Destination, Redshift, SageMaker, Batch),
batch windowing with DLQ, and correct least-privilege IAM roles.
Emits a deployment plan with a READY_TO_DEPLOY checklist.
Mindset
Mindset prose (pipe as point-to-point stream processor, pipe-as-poller, source-dependent batch windows, separate enrichment/target stages) moved verbatim to references/advanced-patterns.md.
Load on demand framing a Pipe deployment.
Quick navigation
| Section |
What it covers |
When to read it |
| Quick reference |
Verdict thresholds + checklist matrix + Pipe limits |
Before any operation |
| Pre-flight |
Source/target ARN gate, IAM, DLQ, batch window |
Before executing any CLI |
| Process |
Per-step: source, filter, enrichment, target, batch window, DLQ, IAM |
When choosing each step |
| Common patterns |
DDB Streams → Lambda / Kinesis → Step Functions / SQS → Batch |
Boilerplate lookup |
| STRICT output contract |
Required PIPE/VERDICT/PRE_CHECKS/STEPS/POST_VERIFY block |
Formatting the response |
| NEVER (top 5) |
Hard rules preventing common insecure patterns |
Review before deploy |
| Expert heuristic |
When to use enrichment vs. inline target Lambda |
Choosing architecture |
Quick reference — verdict thresholds
| Verdict |
Trigger condition |
Action |
PREREQUISITES_MISSING |
Any pre-check failed (source ARN not in ACTIVE/ENABLED state, target ARN unresolvable, source type unsupported in region, DLQ missing or wrong type, IAM permission missing on source or target or enrichment, batch window out of range, MSK unauthenticated cluster without SASL/IAM auth, Amazon MQ broker PENDING/REBOOTING, self-managed Kafka without AuthType set, filter pattern malformed JSON, enrichment ARN type mismatch) |
List failures, do NOT execute |
READY_TO_DEPLOY |
All pre-checks passed; awaiting CONFIRM gate |
Emit exact CLI sequence with full pipe config, wait for operator yes |
Deployment checklist (every dimension must pass):
| Dimension |
Requirement |
Step |
| Source type |
DynamoDB Streams, Kinesis, SQS, MSK, Amazon MQ, or self-managed Kafka |
Step 1 |
| Source state |
ACTIVE/ENABLED (streams), ACTIVE (broker), ACTIVE/CREATING (MSK) |
Step 1 |
| Source ARN region |
Must match Pipe region (cross-region source not supported) |
Step 1 |
| Filter pattern |
Valid JSON matching source record schema (optional) |
Step 2 |
| Enrichment |
Lambda / Step Functions / API Gateway / API Destination (optional) |
Step 3 |
| Target type |
Lambda, Step Functions, EventBridge bus, SQS, SNS, ECS, API Gateway, API Destination, Redshift, SageMaker, Batch |
Step 4 |
| Target resource policy |
Allows pipes.amazonaws.com (or pipe role) to invoke |
Step 4 |
| Batch window |
MaximumBatchingWindowInSeconds 0-300 (ignored for SQS source) |
Step 5 |
| Batch size |
MaximumBatchSize 1-10000, source-specific cap |
Step 5 |
| Record age |
MaximumRecordAgeInSeconds 60-86400 (streaming sources) |
Step 5 |
| Retry attempts |
MaximumRetryAttempts 0-185 (target) |
Step 5 |
| DLQ |
SQS queue ARN in same region; pipe role sqs:SendMessage on DLQ |
Step 6 |
| IAM role |
Pipe role: source read, enrichment invoke, target invoke, DLQ send |
Step 7 |
EventBridge Pipes limits (2026):
- Pipes per account per region (default): 100 (soft limit).
- Pipes per source (default): 1 — a single source can attach to one Pipe only (use EventBridge rules or fan-out via SNS for multiple consumers).
MaximumBatchingWindowInSeconds: 0-300 (0 = invoke immediately on first record).
MaximumBatchSize: 1-10000 (DDB Streams cap 1000, Kinesis cap 10000, SQS cap 10000, MSK/MQ cap 10000).
MaximumRecordAgeInSeconds: 60-86400 (streaming sources only).
MaximumRetryAttempts: 0-185 (target; 185 = ~6 hours backoff).
MaximumRecordAgeInSeconds and DLQ require streaming source (DDB Streams, Kinesis, MSK, MQ, self-managed Kafka). SQS source does not use either — the source queue's own DLQ handles failures.
- Filter pattern: max 4096 chars JSON.
- Concurrent pipe executions per region (default): dynamic, scales with account quota.
- MSK / self-managed Kafka: requires
ConsumerGroupID, StartingPosition (LATEST, TRIM_HORIZON, AT_TIMESTAMP).
Pre-flight: deployment specification gate (run before architecture output)
Before producing the deployment plan, validate the input specification.
Several requirements block deployment — proceeding with an invalid
spec produces a non-functional or insecure Pipe.
Live-account pre-flight verification commands (IAM rights, source/target/enrichment state, DLQ policy, MSK AuthType, MQ credentials secret) moved verbatim to references/diagnostic-commands.md.
Load on demand running pre-checks against a live account.
| Attribute |
Value |
Effect on plan |
| Source = DynamoDB Streams |
Polls stream on Pipe's concurrency |
Requires dynamodbstreams:GetShardIterator, GetRecords, DescribeStream. Source queue/stream NOT attached directly to target. |
| Source = SQS |
Pipe consumes via ReceiveMessage, hides visibility timeout |
DLQ on the SQS queue itself handles poison pills. Pipe-level DLQ ignored. |
| Source = MSK / Amazon MQ / self-managed Kafka |
Requires ConsumerGroupID, StartingPosition, AuthType |
Pipe maintains Kafka consumer offsets. |
| Enrichment = Lambda |
Transforms batched payload before target |
Pipe role needs lambda:InvokeFunction on enrichment function. |
| Target = AWS Batch |
Submits a job to a job queue |
Pipe role needs batch:SubmitJob. |
| Target = API Destination |
HTTPS POST to external endpoint |
Requires API Destination + Connection resources pre-created. |
| DLQ |
SQS queue in same region |
Pipe role needs sqs:SendMessage on DLQ ARN. Streaming sources only. |
If the deployment spec is incomplete (missing source ARN, target
ARN, or source type), output:
PIPE_SPEC: <name-or-unknown>
VERDICT: PREREQUISITES_MISSING
REASON: Deployment specification is missing required fields (<list>).
Cannot produce a Pipe plan without <field> — the resulting deployment
would be non-functional or insecure.
REQUIRED:
- source_type (DynamoDB Streams, Kinesis, SQS, MSK, Amazon MQ, self-managed Kafka)
- source_arn (stream/queue/cluster/broker ARN, region must match Pipe region)
- target_type (Lambda, Step Functions, EventBridge bus, SQS, SNS, ECS, API Gateway, API Destination, Redshift, SageMaker, Batch)
- target_arn
- pipe_role_arn (or accept default least-privilege generated by this skill)
- batch_window_seconds (0-300, ignored for SQS source)
Process — Architecture planning (apply in order, produce deployment plan)
Step 0: Expert knowledge — non-obvious Pipe behaviors that change the plan
Step 0 expert-knowledge bullets (pipe-as-poller, two independent permissions, SQS batch-window exception, DLQ behaviour by source type, enrichment on the batched payload, consumer groups, filter placement, OnPartialBatchItemFailure) moved verbatim to references/advanced-patterns.md.
Load on demand a plan depends on a non-obvious Pipe behaviour.
Step 1: Source — type, ARN, region, state
aws pipes create-pipe \
--name prod-ddb-pipe \
--role-arn arn:aws:iam::111111111111:role/service-role/EventBridgePipesRole \
--source "arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01T00:00:00.000" \
--source-parameters '{"DynamoDBStreamParameters":{"StartingPosition":"LATEST","BatchSize":100,"MaximumBatchingWindowInSeconds":5,"MaximumRecordAgeInSeconds":3600,"DeadLetterConfig":{"Arn":"arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq"},"OnPartialBatchItemFailure":"AUTOMATIC_BISECT"}}'
| Source type |
Required source parameters |
Notes |
| DynamoDB Streams |
StartingPosition (LATEST/TRIM_HORIZON/LATEST), BatchSize, MaximumBatchingWindowInSeconds, MaximumRecordAgeInSeconds, DeadLetterConfig, OnPartialBatchItemFailure |
Stream must be ENABLED. |
| Kinesis |
StartingPosition, BatchSize, MaximumBatchingWindowInSeconds, MaximumRecordAgeInSeconds, DeadLetterConfig, OnPartialBatchItemFailure |
Stream must be ACTIVE. |
| SQS |
QueueUrl or QueueArn, BatchSize |
VisibilityTimeout >= 6x target timeout. DLQ on source queue, NOT pipe-level. |
| MSK |
TopicName, ConsumerGroupID, StartingPosition, BatchSize, AuthType, MaximumRecordAgeInSeconds, DeadLetterConfig |
Cluster ACTIVE. AuthType from SASL_SCRAM_512_AUTH/IAM/MTLS. |
| Amazon MQ |
QueueName, Credentials (Secrets Manager), BatchSize, MaximumBatchingWindowInSeconds |
Broker RUNNING. Pulsar or ActiveMQ. |
| Self-managed Kafka |
TopicName, ConsumerGroupID, StartingPosition, BatchSize, AuthType, ServerRootCA (optional), VpcSubnets/SecurityGroups (for VPC-restricted brokers) |
Requires VPC config for private clusters. |
Step 2: Filter pattern (optional)
--filter-criteria '{"Filters":[{"Pattern":"{\"dynamodb\":{\"NewImage\":{\"status\":{\"S\":\"CONFIRMED\"}}}}"}]}'
Filter patterns match the source's raw record schema:
- DynamoDB Streams: matches
dynamodb.NewImage / OldImage JSON
- Kinesis: matches decoded record JSON
- SQS: matches
body JSON (if body is JSON; otherwise no match)
- Kafka (MSK/MQ/self-managed): matches decoded record value JSON
Validation: a filter pattern that doesn't match any field silently
filters everything. Validate the pattern shape against a sample source
record before deploying. Maximum 4096 chars per pattern.
Step 3: Enrichment (optional — Lambda, Step Functions, API Gateway, API Destination)
--enrichment "arn:aws:lambda:us-east-1:111111111111:function:orders-enrich" \
--enrichment-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'
| Enrichment type |
ARN |
Notes |
| Lambda |
arn:aws:lambda:<region>:<acct>:function:<name> |
Receives the full batched payload, returns transformed batch. InvocationType REQUEST_RESPONSE (sync) required. |
| Step Functions |
arn:aws:states:<region>:<acct>:stateMachine:<name> |
Runs a synchronous Express Workflow (Synchronous Express required; Standard not supported for enrichment). |
| API Gateway |
arn:aws:apigateway:<region>::/restapis/<id>/stages/<stage>/POST/<path> |
REST or HTTP API; called synchronously per batch. |
| API Destination |
arn:aws:events:<region>:<acct>:api-destination/<name> |
HTTPS POST to external endpoint. Requires Connection resource. |
Enrichment IAM: the pipe role needs lambda:InvokeFunction /
states:StartSyncExecution / apigateway:POST /
`events:InvokeApiDestination on the enrichment ARN.
Anti-pattern: NEVER use enrichment for per-record validation. The
enrichment receives the entire batch — a single bad record throws and
retries the whole batch. Use enrichment for batch transformations only.
Step 4: Target — type, ARN, resource policy
--target "arn:aws:lambda:us-east-1:111111111111:function:orders-processor" \
--target-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'
| Target type |
ARN shape |
Resource policy / IAM |
| Lambda |
arn:aws:lambda:<region>:<acct>:function:<name> |
lambda:AllowInvoke from pipes.amazonaws.com OR pipe role. |
| Step Functions |
arn:aws:states:<region>:<acct>:stateMachine:<name> |
Standard or Express supported. Pipe role: states:StartExecution. |
| EventBridge bus |
arn:aws:events:<region>:<acct>:event-bus/<name> |
Pipe role: events:PutEvents. |
| SQS |
arn:aws:sqs:<region>:<acct>:<name> |
Pipe role: sqs:SendMessage. |
| SNS |
arn:aws:sns:<region>:<acct>:<name> |
Pipe role: sns:Publish. |
| ECS task |
arn:aws:ecs:<region>:<acct>:cluster/<cluster> + TaskDefinitionArn |
Pipe role: ecs:RunTask, iam:PassRole on task role. |
| API Gateway |
arn:aws:apigateway:<region>::/restapis/<id>/stages/<stage>/POST/<path> |
Pipe role: apigateway:POST. |
| API Destination |
arn:aws:events:<region>:<acct>:api-destination/<name> |
Pipe role: events:InvokeApiDestination. |
| Redshift |
arn:aws:redshift-serverless:<region>::workgroup/<id> or arn:aws:redshift:<region>:<acct>:cluster:<name> |
Pipe role: redshift-serverless:GetCredentials, redshift-data:ExecuteStatement. |
| SageMaker Pipeline |
arn:aws:sagemaker:<region>:<acct>:pipeline/<name> |
Pipe role: sagemaker:StartPipelineExecution. |
| AWS Batch |
arn:aws:batch:<region>:<acct>:job-queue/<queue> + JobDefinition |
Pipe role: batch:SubmitJob. |
Two-rule check: (1) target ARN resolves in target account; (2)
target resource policy OR pipe role grants the invoke. Emit both as
PRE_CHECKS rows.
Step 5: Batch windowing, retry, record age
# Streaming sources: full batch config
--source-parameters '{
"DynamoDBStreamParameters": {
"StartingPosition": "LATEST",
"BatchSize": 100,
"MaximumBatchingWindowInSeconds": 5,
"MaximumRecordAgeInSeconds": 3600,
"MaximumRetryAttempts": 3,
"OnPartialBatchItemFailure": "AUTOMATIC_BISECT",
"DeadLetterConfig": {"Arn":"arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq"}
}
}'
# SQS source: pipe-level retry only (DLQ on source queue)
--source-parameters '{"SQSQueueParameters":{"BatchSize":10}}'
--target-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'
| Field |
Range |
Applies to |
MaximumBatchingWindowInSeconds |
0-300 |
Streaming sources only (ignored for SQS) |
BatchSize / MaximumBatchSize |
1-1000 DDB / 1-10000 Kinesis / 1-10000 SQS / 1-10000 Kafka |
All sources |
MaximumRecordAgeInSeconds |
60-86400 |
Streaming sources only |
MaximumRetryAttempts |
0-185 |
Target (per-batch retry) |
OnPartialBatchItemFailure |
AUTOMATIC_BISECT |
DDB Streams, Kinesis, SQS (2024+) |
Step 6: Dead-letter queue
# Create DLQ (one-time)
aws sqs create-queue --queue-name prod-pipe-dlq
# Attach to pipe via source-parameters DeadLetterConfig.Arn (streaming sources)
Two-DLQ rule:
- Streaming sources (DDB Streams, Kinesis, MSK, MQ, self-managed Kafka): DLQ lives on the pipe (
DeadLetterConfig.Arn inside the source-parameters block). Records that exceed retry or record-age land here.
- SQS sources: DLQ lives on the source SQS queue via
RedrivePolicy. The pipe-level DeadLetterConfig is ignored. Configure maxReceiveCount on the source queue's redrive policy.
Pipe role needs sqs:SendMessage on the DLQ ARN (or on the source
queue's DLQ for the SQS case — the SQS service uses the queue's own
permissions, not the pipe role's).
Step 7: IAM role — least-privilege trust + permissions
Step 7 IAM trust-policy JSON plus the per-source and per-enrichment/target permission matrices moved verbatim to references/iam-and-dlq-guide.md.
Load on demand generating the pipe role trust and permissions policies.
Common patterns
Common Pipe patterns (DDB Streams→Lambda, Kinesis→Step Functions, SQS→Lambda, MSK→Batch, DDB Streams→enrichment→Step Functions) moved verbatim to references/worked-examples.md.
Load on demand selecting a boilerplate pattern.
Output format
The PIPE_SPEC/ARCHITECTURE/CHECKLIST/FINDINGS/DEPLOY_COMMANDS output template moved verbatim to references/worked-examples.md.
Load on demand formatting the architecture summary block.
STRICT output contract
Required output structure
Every response MUST begin with this block — no preamble, no
conversational opening:
PIPE: <pipe-name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
TARGET: <pipe-name> (pipe-arn: <arn> for updates)
PRE_CHECKS:
- [PASS] <check description>
- [FAIL] <check description> — <reason>
STEPS:
1. CONFIRM: About to <operation> pipe <name> in account <account>. This will <consequence>. Estimated monthly cost: <$X>. Proceed? (yes/no)
2. <exact CLI command — no placeholders>
POST_VERIFY:
- [PASS] <verification description>
- [FAIL] <verification description> — <reason>
SOURCE: <type> <arn> region <region>
FILTER: <none | JSON pattern>
ENRICHMENT: <none | type arn>
TARGET: <type> <arn>
BATCH: window <seconds> size <records> retry <count> age <seconds>
DLQ: <arn | source-queue redrive>
NOTES: <filter selectivity, retry behavior, cost posture>
FORBIDDEN output patterns
- NEVER start with "Let me analyze…" or "I'll create…" — the VERDICT
block is the FIRST line, always. No conversational preamble.
- NEVER use lowercase verdict values — emit
READY_TO_DEPLOY or
PREREQUISITES_MISSING (not ready, prerequisites).
- NEVER omit PRE_CHECKS — every pre-check run must appear with
[PASS]
or [FAIL] and a specific reason for each failure. An empty
PRE_CHECKS block is non-compliant.
- NEVER emit a plan with placeholder values (e.g.,
<source-arn>,
<account-id>) in a READY_TO_DEPLOY plan — every field must be
populated with actual values from the input.
- NEVER omit the CONFIRM gate as the first STEPS entry for any
state-changing operation.
- NEVER claim success without verifying the pipe is
RUNNING via
describe-pipe — a CREATED pipe that has not been started does not
process events.
- NEVER silently allow SQS source with pipe-level
DeadLetterConfig —
call it out as a [WARN] in PRE_CHECKS and direct the user to
configure RedrivePolicy on the source queue.
- NEVER allow MSK or self-managed Kafka source without an explicit
AuthType — NONE is rejected for non-local clusters.
Perfect example output
PIPE: prod-orders-pipe
VERDICT: READY_TO_DEPLOY
TARGET: prod-orders-pipe
PRE_CHECKS:
- [PASS] DynamoDB Streams arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01 resolves state=ENABLED
- [PASS] Source region us-east-1 matches pipe region
- [PASS] Filter pattern {"dynamodb":{"NewImage":{"status":{"S":"CONFIRMED"}}}} valid JSON
- [PASS] Enrichment Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-enrich resolves state=Active
- [PASS] Enrichment resource policy grants lambda:InvokeFunction to pipes.amazonaws.com
- [PASS] Target Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-processor resolves state=Active
- [PASS] Target resource policy grants lambda:InvokeFunction to pipes.amazonaws.com
- [PASS] Batch window 5s in range 0-300
- [PASS] Batch size 100 within DynamoDB Streams cap (1000)
- [PASS] DLQ arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq policy grants sqs:SendMessage to pipe role
- [PASS] Pipe role trust policy scoped to pipes.amazonaws.com with SourceAccount=111111111111
- [PASS] IAM principal holds pipes:CreatePipe, StartPipe, DescribePipe
STEPS:
1. CONFIRM: About to create-pipe prod-orders-pipe in account 111111111111. Reads DynamoDB Streams Orders table, filter CONFIRMED, Lambda enrichment, Lambda target, 5s batch window, DLQ prod-pipe-dlq. Estimated cost: $0.50/mo base + $0.50/million invocations. Proceed? (yes/no)
2. aws iam create-role --role-name EventBridgePipes-prod-orders --assume-role-policy-document file://trust-policy.json
3. aws iam put-role-policy --role-name EventBridgePipes-prod-orders --policy-name pipe-permissions --policy-document file://permissions.json
4. aws sqs create-queue --queue-name prod-pipe-dlq
5. aws pipes create-pipe --name prod-orders-pipe --role-arn arn:aws:iam::111111111111:role/EventBridgePipes-prod-orders --source "arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01T00:00:00.000" --source-parameters '{"DynamoDBStreamParameters":{"StartingPosition":"LATEST","BatchSize":100,"MaximumBatchingWindowInSeconds":5,"MaximumRecordAgeInSeconds":3600,"MaximumRetryAttempts":3,"OnPartialBatchItemFailure":"AUTOMATIC_BISECT","DeadLetterConfig":{"Arn":"arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq"}}}' --filter-criteria '{"Filters":[{"Pattern":"{\"dynamodb\":{\"NewImage\":{\"status\":{\"S\":\"CONFIRMED\"}}}}"}]}' --enrichment "arn:aws:lambda:us-east-1:111111111111:function:orders-enrich" --target "arn:aws:lambda:us-east-1:111111111111:function:orders-processor" --target-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'
6. aws pipes start-pipe --name prod-orders-pipe
POST_VERIFY:
- (pending execution)
- describe-pipe returns CurrentState=RUNNING
- Sample order with status=CONFIRMED triggers orders-enrich then orders-processor within 10s
- Sample order with status=PENDING is filtered out (no target invocation)
- DLQ prod-pipe-dlq receives no messages under normal operation; inject poison record to verify DLQ
SOURCE: DynamoDB Streams arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01 region us-east-1
FILTER: {"dynamodb":{"NewImage":{"status":{"S":"CONFIRMED"}}}}
ENRICHMENT: Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-enrich
TARGET: Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-processor
BATCH: window 5s size 100 retry 3 age 3600s
DLQ: arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq (pipe-level)
NOTES:
- Filter selectivity ~30% (only CONFIRMED orders reach enrichment). Estimate target invocations = source records x 0.30.
- Enrichment runs on full batch of up to 100 records; throws on any record -> entire batch retried.
- poison record isolated via bisection within 3-4 retries.
- Cost: $0.50/mo per pipe base + $0.50 per million invocations (DDB Streams throughput-priced separately).
NEVER (top 5)
These are the highest-impact, most-frequent failure modes in
EventBridge Pipes deployments. Violating any one of these is a
correctness or security regression.
NEVER rely on target's own event-source mapping. A Pipe from
DynamoDB Streams → Lambda does NOT use Lambda's
create-event-source-mapping. The Pipe's own role reads the stream
and invokes the target. Configuring both a Pipe AND a Lambda
event-source mapping on the same stream double-delivers records.
NEVER configure a pipe-level DeadLetterConfig for an SQS source
and expect it to catch poison messages. For SQS sources, the DLQ
is on the source queue via RedrivePolicy — the pipe-level
DeadLetterConfig is silently ignored. Always configure the source
queue's RedrivePolicy with maxReceiveCount for SQS-sourced pipes.
NEVER deploy without verifying the target resource policy grants
invoke to pipes.amazonaws.com (or the pipe role ARN). For Lambda,
Step Functions, API Gateway targets, a missing resource-based policy
causes silent invocation failures (visible only in CloudWatch metrics
for the pipe). The IAM role alone is NOT sufficient for
resource-based policy targets.
NEVER set MaximumBatchingWindowInSeconds > 0 for latency-critical
SQS workloads without measuring. For SQS sources the batching
window IS applied (despite general guidance that "SQS ignores it") —
the higher the window, the longer the end-to-end latency. For SQS,
prefer BatchSize alone with window=0 unless you specifically need
batch coalescing.
NEVER deploy an MSK or self-managed Kafka source without an
explicit ConsumerGroupID. Two pipes sharing a consumer group
split partitions between them (throughput halved per pipe); two
pipes with different consumer groups each receive all records
(duplicate processing). Pick the consumer group deliberately based
on fan-out semantics.
Expert heuristic: when to use enrichment vs. inline target Lambda
The enrichment-vs-inline-target decision table and rules moved verbatim to references/advanced-patterns.md.
Load on demand choosing where transformation logic belongs.
Recent AWS features (2024-2026)
Recent AWS features (Batch target, enrichment transformations, AUTOMATIC_BISECT, self-managed Kafka, Amazon MQ, Redshift/SageMaker targets, API Destination) moved verbatim to references/advanced-patterns.md.
Load on demand checking whether a newer AWS feature changes the plan.
AWS documentation
References (load on demand)
- references/worked-examples.md — the common Pipe patterns and the PIPE_SPEC output-format template, moved from SKILL.md.
- references/diagnostic-commands.md — live-account pre-flight verification commands (IAM, source/target/enrichment state, DLQ policy, MSK auth, MQ credentials), moved from SKILL.md.
- references/advanced-patterns.md — mindset, Step 0 expert knowledge, the enrichment-vs-inline-target heuristic, and recent AWS features, moved from SKILL.md.
- references/iam-and-dlq-guide.md — pipe role permission templates, plus the Step 7 trust-policy JSON and per-source/per-target permission matrices moved from SKILL.md.
- references/sources-and-targets.md — source/target matrices, batch behavior, filter pattern rules, MSK/MQ guides.
1---2name: eventbridge-pipe-deployer3description: Provisions production-grade Amazon EventBridge Pipes connecting sources (DynamoDB Streams, Kinesis, SQS, MSK, Amazon MQ, self-managed Kafka) to targets (Lambda, Step Functions, EventBridge bus, SQS, SNS, ECS, API Gateway, API Destination, Redshift, SageMaker, AWS Batch) with optional filter patterns, optional enrichment (Lambda, Step Functions, API Gateway, API Destination), batch windowing, dead-letter queue, and correct IAM roles. Emits READY_TO_DEPLOY with an ordered CLI plan or PREREQUISITES_MISSING with the specific gap. Use when wiring a streaming source to a downstream target via Pipes, configuring batch windows and DLQs, adding enrichment transformations, or routing Kafka/MSK topics to Step Functions.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan generation. Live deployment uses aws pipes create-pipe, update-pipe, start-pipe, describe-pipe, tag-resource, aws iam create-role, attach-role-policy, aws sqs create-queue, get-queue-attributes, aws dynamodbstreams describe-stream, aws kinesis describe-stream, aws kafka describe-cluster, aws mq describe-broker, and aws lambda add-permission (AWS CLI v2, SSO or key-based...6metadata:7 source: https://skillmd.com/skills/jhkchan/eventbridge-pipe-deployer8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '1'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: AppIntegration15 task_type: deploy16 skill_class: capability17 lifecycle_status: active18 verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING19 when_to_use: Provisioning a new EventBridge Pipe from a streaming or polling source to a downstream target, configuring batch windowing and concurrency, attaching a dead-letter queue for failed events, inserting an enrichment step (Lambda, Step Functions, API Gateway, API Destination), wiring an AWS Batch or Redshift or SageMaker target, configuring a filter pattern to pre-filter source records, or sourcing from MSK / Amazon MQ / self-managed Kafka.20 activation_triggers: create EventBridge Pipe, deploy EventBridge Pipe, DynamoDB Streams to Lambda pipe, Kinesis to Step Functions pipe, SQS to Lambda pipe, MSK source pipe, Amazon MQ source pipe, self-managed Kafka pipe, pipe enrichment Lambda, pipe enrichment Step Functions, pipe filter pattern, pipe batch window, MaximumBatchingWindowInSeconds, pipe DLQ, EventBridge Pipe IAM role, pipe to EventBridge bus, pipe to ECS task, pipe to API Destination, pipe to Redshift, pipe to SageMaker, pipe to AWS Batch21 invocation_schema: 'Input (one of): (a) a deployment spec — source (DynamoDB Streams / Kinesis / SQS / MSK / Amazon MQ / self-managed Kafka), optional filter pattern, optional enrichment (Lambda / Step Functions / API Gateway / API Destination), target (Lambda / Step Functions / EventBridge bus / SQS / SNS / ECS / API Gateway / API Destination / Redshift / SageMaker / Batch), batch window and batch size, DLQ ARN, IAM role configuration; (b) a partial spec for interactive refinement; (c) an existing pipe ARN for review against the well-architected checklist. Output: PIPE_SPEC, VERDICT, ARCHITECTURE, CHECKLIST[], FINDINGS[], DEPLOY_COMMANDS — where VERDICT is READY_TO_DEPLOY or PREREQUISITES_MISSING.'22 version: 0.1.023 author: Jacky Chan — AWS Community Builder24 keywords: EventBridge Pipes, pipe deploy, DynamoDB Streams source, Kinesis source, SQS source, MSK source, Amazon MQ source, self-managed Kafka, Lambda target, Step Functions target, EventBridge bus target, SQS target, SNS target, ECS task target, API Gateway target, API Destination target, Redshift target, SageMaker target, AWS Batch target, enrichment Lambda, enrichment Step Functions, filter pattern, batch window, MaximumBatchingWindowInSeconds, MaximumBatchSize, dead-letter queue, DLQ, pipe IAM role, enrichment transformation25 tags: eventbridge, pipes, app-integration, event-driven, deploy, streaming, dlq, batch-window, enrichment26---2728# EventBridge Pipe Deployer2930## What this skill does3132Provisions production-grade Amazon EventBridge Pipes connecting a33streaming or polling source to a downstream target with secure34defaults: source selection (DynamoDB Streams, Kinesis, SQS, MSK,35Amazon MQ, self-managed Kafka), optional filter pattern, optional36enrichment (Lambda, Step Functions, API Gateway, API Destination),37target selection (Lambda, Step Functions, EventBridge bus, SQS, SNS,38ECS, API Gateway, API Destination, Redshift, SageMaker, Batch),39batch windowing with DLQ, and correct least-privilege IAM roles.40Emits a deployment plan with a READY_TO_DEPLOY checklist.4142## Mindset4344Mindset prose (pipe as point-to-point stream processor, pipe-as-poller, source-dependent batch windows, separate enrichment/target stages) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).45Load on demand framing a Pipe deployment.4647## Quick navigation4849| Section | What it covers | When to read it |50|---|---|---|51| **Quick reference** | Verdict thresholds + checklist matrix + Pipe limits | Before any operation |52| **Pre-flight** | Source/target ARN gate, IAM, DLQ, batch window | Before executing any CLI |53| **Process** | Per-step: source, filter, enrichment, target, batch window, DLQ, IAM | When choosing each step |54| **Common patterns** | DDB Streams → Lambda / Kinesis → Step Functions / SQS → Batch | Boilerplate lookup |55| **STRICT output contract** | Required PIPE/VERDICT/PRE_CHECKS/STEPS/POST_VERIFY block | Formatting the response |56| **NEVER (top 5)** | Hard rules preventing common insecure patterns | Review before deploy |57| **Expert heuristic** | When to use enrichment vs. inline target Lambda | Choosing architecture |5859## Quick reference — verdict thresholds6061| Verdict | Trigger condition | Action |62|---|---|---|63| `PREREQUISITES_MISSING` | Any pre-check failed (source ARN not in `ACTIVE`/`ENABLED` state, target ARN unresolvable, source type unsupported in region, DLQ missing or wrong type, IAM permission missing on source or target or enrichment, batch window out of range, MSK unauthenticated cluster without SASL/IAM auth, Amazon MQ broker `PENDING`/`REBOOTING`, self-managed Kafka without `AuthType` set, filter pattern malformed JSON, enrichment ARN type mismatch) | List failures, do NOT execute |64| `READY_TO_DEPLOY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence with full pipe config, wait for operator yes |6566**Deployment checklist (every dimension must pass):**6768| Dimension | Requirement | Step |69|---|---|---|70| Source type | DynamoDB Streams, Kinesis, SQS, MSK, Amazon MQ, or self-managed Kafka | Step 1 |71| Source state | `ACTIVE`/`ENABLED` (streams), `ACTIVE` (broker), `ACTIVE`/`CREATING` (MSK) | Step 1 |72| Source ARN region | Must match Pipe region (cross-region source not supported) | Step 1 |73| Filter pattern | Valid JSON matching source record schema (optional) | Step 2 |74| Enrichment | Lambda / Step Functions / API Gateway / API Destination (optional) | Step 3 |75| Target type | Lambda, Step Functions, EventBridge bus, SQS, SNS, ECS, API Gateway, API Destination, Redshift, SageMaker, Batch | Step 4 |76| Target resource policy | Allows `pipes.amazonaws.com` (or pipe role) to invoke | Step 4 |77| Batch window | `MaximumBatchingWindowInSeconds` 0-300 (ignored for SQS source) | Step 5 |78| Batch size | `MaximumBatchSize` 1-10000, source-specific cap | Step 5 |79| Record age | `MaximumRecordAgeInSeconds` 60-86400 (streaming sources) | Step 5 |80| Retry attempts | `MaximumRetryAttempts` 0-185 (target) | Step 5 |81| DLQ | SQS queue ARN in same region; pipe role `sqs:SendMessage` on DLQ | Step 6 |82| IAM role | Pipe role: source read, enrichment invoke, target invoke, DLQ send | Step 7 |8384**EventBridge Pipes limits (2026):**8586- Pipes per account per region (default): 100 (soft limit).87- Pipes per source (default): 1 — a single source can attach to one Pipe only (use EventBridge rules or fan-out via SNS for multiple consumers).88- `MaximumBatchingWindowInSeconds`: 0-300 (0 = invoke immediately on first record).89- `MaximumBatchSize`: 1-10000 (DDB Streams cap 1000, Kinesis cap 10000, SQS cap 10000, MSK/MQ cap 10000).90- `MaximumRecordAgeInSeconds`: 60-86400 (streaming sources only).91- `MaximumRetryAttempts`: 0-185 (target; 185 = ~6 hours backoff).92- `MaximumRecordAgeInSeconds` and DLQ require streaming source (DDB Streams, Kinesis, MSK, MQ, self-managed Kafka). SQS source does not use either — the source queue's own DLQ handles failures.93- Filter pattern: max 4096 chars JSON.94- Concurrent pipe executions per region (default): dynamic, scales with account quota.95- MSK / self-managed Kafka: requires `ConsumerGroupID`, `StartingPosition` (`LATEST`, `TRIM_HORIZON`, `AT_TIMESTAMP`).9697## Pre-flight: deployment specification gate (run before architecture output)9899Before producing the deployment plan, validate the input specification.100Several requirements **block deployment** — proceeding with an invalid101spec produces a non-functional or insecure Pipe.102103Live-account pre-flight verification commands (IAM rights, source/target/enrichment state, DLQ policy, MSK AuthType, MQ credentials secret) moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md).104Load on demand running pre-checks against a live account.105106| Attribute | Value | Effect on plan |107|---|---|---|108| Source = DynamoDB Streams | Polls stream on Pipe's concurrency | Requires `dynamodbstreams:GetShardIterator`, `GetRecords`, `DescribeStream`. Source queue/stream NOT attached directly to target. |109| Source = SQS | Pipe consumes via `ReceiveMessage`, hides visibility timeout | DLQ on the SQS queue itself handles poison pills. Pipe-level DLQ ignored. |110| Source = MSK / Amazon MQ / self-managed Kafka | Requires `ConsumerGroupID`, `StartingPosition`, `AuthType` | Pipe maintains Kafka consumer offsets. |111| Enrichment = Lambda | Transforms batched payload before target | Pipe role needs `lambda:InvokeFunction` on enrichment function. |112| Target = AWS Batch | Submits a job to a job queue | Pipe role needs `batch:SubmitJob`. |113| Target = API Destination | HTTPS POST to external endpoint | Requires API Destination + Connection resources pre-created. |114| DLQ | SQS queue in same region | Pipe role needs `sqs:SendMessage` on DLQ ARN. Streaming sources only. |115116**If the deployment spec is incomplete** (missing source ARN, target117ARN, or source type), output:118119```text120PIPE_SPEC: <name-or-unknown>121VERDICT: PREREQUISITES_MISSING122REASON: Deployment specification is missing required fields (<list>).123Cannot produce a Pipe plan without <field> — the resulting deployment124would be non-functional or insecure.125REQUIRED:126 - source_type (DynamoDB Streams, Kinesis, SQS, MSK, Amazon MQ, self-managed Kafka)127 - source_arn (stream/queue/cluster/broker ARN, region must match Pipe region)128 - target_type (Lambda, Step Functions, EventBridge bus, SQS, SNS, ECS, API Gateway, API Destination, Redshift, SageMaker, Batch)129 - target_arn130 - pipe_role_arn (or accept default least-privilege generated by this skill)131 - batch_window_seconds (0-300, ignored for SQS source)132```133134## Process — Architecture planning (apply in order, produce deployment plan)135136### Step 0: Expert knowledge — non-obvious Pipe behaviors that change the plan137138Step 0 expert-knowledge bullets (pipe-as-poller, two independent permissions, SQS batch-window exception, DLQ behaviour by source type, enrichment on the batched payload, consumer groups, filter placement, OnPartialBatchItemFailure) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).139Load on demand a plan depends on a non-obvious Pipe behaviour.140141### Step 1: Source — type, ARN, region, state142143```bash144aws pipes create-pipe \145 --name prod-ddb-pipe \146 --role-arn arn:aws:iam::111111111111:role/service-role/EventBridgePipesRole \147 --source "arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01T00:00:00.000" \148 --source-parameters '{"DynamoDBStreamParameters":{"StartingPosition":"LATEST","BatchSize":100,"MaximumBatchingWindowInSeconds":5,"MaximumRecordAgeInSeconds":3600,"DeadLetterConfig":{"Arn":"arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq"},"OnPartialBatchItemFailure":"AUTOMATIC_BISECT"}}'149```150151| Source type | Required source parameters | Notes |152|---|---|---|153| DynamoDB Streams | `StartingPosition` (LATEST/TRIM_HORIZON/LATEST), `BatchSize`, `MaximumBatchingWindowInSeconds`, `MaximumRecordAgeInSeconds`, `DeadLetterConfig`, `OnPartialBatchItemFailure` | Stream must be `ENABLED`. |154| Kinesis | `StartingPosition`, `BatchSize`, `MaximumBatchingWindowInSeconds`, `MaximumRecordAgeInSeconds`, `DeadLetterConfig`, `OnPartialBatchItemFailure` | Stream must be `ACTIVE`. |155| SQS | `QueueUrl` or `QueueArn`, `BatchSize` | VisibilityTimeout >= 6x target timeout. DLQ on source queue, NOT pipe-level. |156| MSK | `TopicName`, `ConsumerGroupID`, `StartingPosition`, `BatchSize`, `AuthType`, `MaximumRecordAgeInSeconds`, `DeadLetterConfig` | Cluster `ACTIVE`. AuthType from `SASL_SCRAM_512_AUTH`/`IAM`/`MTLS`. |157| Amazon MQ | `QueueName`, `Credentials` (Secrets Manager), `BatchSize`, `MaximumBatchingWindowInSeconds` | Broker `RUNNING`. Pulsar or ActiveMQ. |158| Self-managed Kafka | `TopicName`, `ConsumerGroupID`, `StartingPosition`, `BatchSize`, `AuthType`, `ServerRootCA` (optional), `VpcSubnets/SecurityGroups` (for VPC-restricted brokers) | Requires VPC config for private clusters. |159160### Step 2: Filter pattern (optional)161162```bash163--filter-criteria '{"Filters":[{"Pattern":"{\"dynamodb\":{\"NewImage\":{\"status\":{\"S\":\"CONFIRMED\"}}}}"}]}'164```165166Filter patterns match the **source's raw record schema**:167168- DynamoDB Streams: matches `dynamodb.NewImage` / `OldImage` JSON169- Kinesis: matches decoded record JSON170- SQS: matches `body` JSON (if `body` is JSON; otherwise no match)171- Kafka (MSK/MQ/self-managed): matches decoded record value JSON172173**Validation:** a filter pattern that doesn't match any field silently174filters everything. Validate the pattern shape against a sample source175record before deploying. Maximum 4096 chars per pattern.176177### Step 3: Enrichment (optional — Lambda, Step Functions, API Gateway, API Destination)178179```bash180--enrichment "arn:aws:lambda:us-east-1:111111111111:function:orders-enrich" \181--enrichment-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'182```183184| Enrichment type | ARN | Notes |185|---|---|---|186| Lambda | `arn:aws:lambda:<region>:<acct>:function:<name>` | Receives the full batched payload, returns transformed batch. `InvocationType` REQUEST_RESPONSE (sync) required. |187| Step Functions | `arn:aws:states:<region>:<acct>:stateMachine:<name>` | Runs a synchronous Express Workflow (Synchronous Express required; Standard not supported for enrichment). |188| API Gateway | `arn:aws:apigateway:<region>::/restapis/<id>/stages/<stage>/POST/<path>` | REST or HTTP API; called synchronously per batch. |189| API Destination | `arn:aws:events:<region>:<acct>:api-destination/<name>` | HTTPS POST to external endpoint. Requires Connection resource. |190191**Enrichment IAM:** the pipe role needs `lambda:InvokeFunction` /192`states:StartSyncExecution` / `apigateway:POST` /193`events:InvokeApiDestination on the enrichment ARN.194195**Anti-pattern:** NEVER use enrichment for per-record validation. The196enrichment receives the entire batch — a single bad record throws and197retries the whole batch. Use enrichment for batch transformations only.198199### Step 4: Target — type, ARN, resource policy200201```bash202--target "arn:aws:lambda:us-east-1:111111111111:function:orders-processor" \203--target-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'204```205206| Target type | ARN shape | Resource policy / IAM |207|---|---|---|208| Lambda | `arn:aws:lambda:<region>:<acct>:function:<name>` | `lambda:AllowInvoke` from `pipes.amazonaws.com` OR pipe role. |209| Step Functions | `arn:aws:states:<region>:<acct>:stateMachine:<name>` | Standard or Express supported. Pipe role: `states:StartExecution`. |210| EventBridge bus | `arn:aws:events:<region>:<acct>:event-bus/<name>` | Pipe role: `events:PutEvents`. |211| SQS | `arn:aws:sqs:<region>:<acct>:<name>` | Pipe role: `sqs:SendMessage`. |212| SNS | `arn:aws:sns:<region>:<acct>:<name>` | Pipe role: `sns:Publish`. |213| ECS task | `arn:aws:ecs:<region>:<acct>:cluster/<cluster>` + `TaskDefinitionArn` | Pipe role: `ecs:RunTask`, `iam:PassRole` on task role. |214| API Gateway | `arn:aws:apigateway:<region>::/restapis/<id>/stages/<stage>/POST/<path>` | Pipe role: `apigateway:POST`. |215| API Destination | `arn:aws:events:<region>:<acct>:api-destination/<name>` | Pipe role: `events:InvokeApiDestination`. |216| Redshift | `arn:aws:redshift-serverless:<region>::workgroup/<id>` or `arn:aws:redshift:<region>:<acct>:cluster:<name>` | Pipe role: `redshift-serverless:GetCredentials`, `redshift-data:ExecuteStatement`. |217| SageMaker Pipeline | `arn:aws:sagemaker:<region>:<acct>:pipeline/<name>` | Pipe role: `sagemaker:StartPipelineExecution`. |218| AWS Batch | `arn:aws:batch:<region>:<acct>:job-queue/<queue>` + `JobDefinition` | Pipe role: `batch:SubmitJob`. |219220**Two-rule check:** (1) target ARN resolves in target account; (2)221target resource policy OR pipe role grants the invoke. Emit both as222PRE_CHECKS rows.223224### Step 5: Batch windowing, retry, record age225226```bash227# Streaming sources: full batch config228--source-parameters '{229 "DynamoDBStreamParameters": {230 "StartingPosition": "LATEST",231 "BatchSize": 100,232 "MaximumBatchingWindowInSeconds": 5,233 "MaximumRecordAgeInSeconds": 3600,234 "MaximumRetryAttempts": 3,235 "OnPartialBatchItemFailure": "AUTOMATIC_BISECT",236 "DeadLetterConfig": {"Arn":"arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq"}237 }238}'239240# SQS source: pipe-level retry only (DLQ on source queue)241--source-parameters '{"SQSQueueParameters":{"BatchSize":10}}'242--target-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'243```244245| Field | Range | Applies to |246|---|---|---|247| `MaximumBatchingWindowInSeconds` | 0-300 | Streaming sources only (ignored for SQS) |248| `BatchSize` / `MaximumBatchSize` | 1-1000 DDB / 1-10000 Kinesis / 1-10000 SQS / 1-10000 Kafka | All sources |249| `MaximumRecordAgeInSeconds` | 60-86400 | Streaming sources only |250| `MaximumRetryAttempts` | 0-185 | Target (per-batch retry) |251| `OnPartialBatchItemFailure` | `AUTOMATIC_BISECT` | DDB Streams, Kinesis, SQS (2024+) |252253### Step 6: Dead-letter queue254255```bash256# Create DLQ (one-time)257aws sqs create-queue --queue-name prod-pipe-dlq258# Attach to pipe via source-parameters DeadLetterConfig.Arn (streaming sources)259```260261**Two-DLQ rule:**262263- **Streaming sources (DDB Streams, Kinesis, MSK, MQ, self-managed Kafka):** DLQ lives on the pipe (`DeadLetterConfig.Arn` inside the source-parameters block). Records that exceed retry or record-age land here.264- **SQS sources:** DLQ lives on the **source SQS queue** via `RedrivePolicy`. The pipe-level `DeadLetterConfig` is ignored. Configure `maxReceiveCount` on the source queue's redrive policy.265266Pipe role needs `sqs:SendMessage` on the DLQ ARN (or on the source267queue's DLQ for the SQS case — the SQS service uses the queue's own268permissions, not the pipe role's).269270### Step 7: IAM role — least-privilege trust + permissions271272Step 7 IAM trust-policy JSON plus the per-source and per-enrichment/target permission matrices moved verbatim to [references/iam-and-dlq-guide.md](references/iam-and-dlq-guide.md).273Load on demand generating the pipe role trust and permissions policies.274275## Common patterns276277Common Pipe patterns (DDB Streams→Lambda, Kinesis→Step Functions, SQS→Lambda, MSK→Batch, DDB Streams→enrichment→Step Functions) moved verbatim to [references/worked-examples.md](references/worked-examples.md).278Load on demand selecting a boilerplate pattern.279280## Output format281282The PIPE_SPEC/ARCHITECTURE/CHECKLIST/FINDINGS/DEPLOY_COMMANDS output template moved verbatim to [references/worked-examples.md](references/worked-examples.md).283Load on demand formatting the architecture summary block.284285## STRICT output contract286287### Required output structure288289Every response MUST begin with this block — no preamble, no290conversational opening:291292```text293PIPE: <pipe-name>294VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING295TARGET: <pipe-name> (pipe-arn: <arn> for updates)296PRE_CHECKS:297 - [PASS] <check description>298 - [FAIL] <check description> — <reason>299STEPS:300 1. CONFIRM: About to <operation> pipe <name> in account <account>. This will <consequence>. Estimated monthly cost: <$X>. Proceed? (yes/no)301 2. <exact CLI command — no placeholders>302POST_VERIFY:303 - [PASS] <verification description>304 - [FAIL] <verification description> — <reason>305SOURCE: <type> <arn> region <region>306FILTER: <none | JSON pattern>307ENRICHMENT: <none | type arn>308TARGET: <type> <arn>309BATCH: window <seconds> size <records> retry <count> age <seconds>310DLQ: <arn | source-queue redrive>311NOTES: <filter selectivity, retry behavior, cost posture>312```313314### FORBIDDEN output patterns315316- NEVER start with "Let me analyze…" or "I'll create…" — the VERDICT317 block is the FIRST line, always. No conversational preamble.318- NEVER use lowercase verdict values — emit `READY_TO_DEPLOY` or319 `PREREQUISITES_MISSING` (not `ready`, `prerequisites`).320- NEVER omit PRE_CHECKS — every pre-check run must appear with `[PASS]`321 or `[FAIL]` and a specific reason for each failure. An empty322 PRE_CHECKS block is non-compliant.323- NEVER emit a plan with placeholder values (e.g., `<source-arn>`,324 `<account-id>`) in a READY_TO_DEPLOY plan — every field must be325 populated with actual values from the input.326- NEVER omit the CONFIRM gate as the first STEPS entry for any327 state-changing operation.328- NEVER claim success without verifying the pipe is `RUNNING` via329 `describe-pipe` — a CREATED pipe that has not been started does not330 process events.331- NEVER silently allow SQS source with pipe-level `DeadLetterConfig` —332 call it out as a [WARN] in PRE_CHECKS and direct the user to333 configure `RedrivePolicy` on the source queue.334- NEVER allow MSK or self-managed Kafka source without an explicit335 `AuthType` — `NONE` is rejected for non-local clusters.336337### Perfect example output338339```text340PIPE: prod-orders-pipe341VERDICT: READY_TO_DEPLOY342TARGET: prod-orders-pipe343PRE_CHECKS:344 - [PASS] DynamoDB Streams arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01 resolves state=ENABLED345 - [PASS] Source region us-east-1 matches pipe region346 - [PASS] Filter pattern {"dynamodb":{"NewImage":{"status":{"S":"CONFIRMED"}}}} valid JSON347 - [PASS] Enrichment Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-enrich resolves state=Active348 - [PASS] Enrichment resource policy grants lambda:InvokeFunction to pipes.amazonaws.com349 - [PASS] Target Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-processor resolves state=Active350 - [PASS] Target resource policy grants lambda:InvokeFunction to pipes.amazonaws.com351 - [PASS] Batch window 5s in range 0-300352 - [PASS] Batch size 100 within DynamoDB Streams cap (1000)353 - [PASS] DLQ arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq policy grants sqs:SendMessage to pipe role354 - [PASS] Pipe role trust policy scoped to pipes.amazonaws.com with SourceAccount=111111111111355 - [PASS] IAM principal holds pipes:CreatePipe, StartPipe, DescribePipe356STEPS:357 1. CONFIRM: About to create-pipe prod-orders-pipe in account 111111111111. Reads DynamoDB Streams Orders table, filter CONFIRMED, Lambda enrichment, Lambda target, 5s batch window, DLQ prod-pipe-dlq. Estimated cost: $0.50/mo base + $0.50/million invocations. Proceed? (yes/no)358 2. aws iam create-role --role-name EventBridgePipes-prod-orders --assume-role-policy-document file://trust-policy.json359 3. aws iam put-role-policy --role-name EventBridgePipes-prod-orders --policy-name pipe-permissions --policy-document file://permissions.json360 4. aws sqs create-queue --queue-name prod-pipe-dlq361 5. aws pipes create-pipe --name prod-orders-pipe --role-arn arn:aws:iam::111111111111:role/EventBridgePipes-prod-orders --source "arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01T00:00:00.000" --source-parameters '{"DynamoDBStreamParameters":{"StartingPosition":"LATEST","BatchSize":100,"MaximumBatchingWindowInSeconds":5,"MaximumRecordAgeInSeconds":3600,"MaximumRetryAttempts":3,"OnPartialBatchItemFailure":"AUTOMATIC_BISECT","DeadLetterConfig":{"Arn":"arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq"}}}' --filter-criteria '{"Filters":[{"Pattern":"{\"dynamodb\":{\"NewImage\":{\"status\":{\"S\":\"CONFIRMED\"}}}}"}]}' --enrichment "arn:aws:lambda:us-east-1:111111111111:function:orders-enrich" --target "arn:aws:lambda:us-east-1:111111111111:function:orders-processor" --target-parameters '{"LambdaParameters":{"InvocationType":"REQUEST_RESPONSE"}}'362 6. aws pipes start-pipe --name prod-orders-pipe363POST_VERIFY:364 - (pending execution)365 - describe-pipe returns CurrentState=RUNNING366 - Sample order with status=CONFIRMED triggers orders-enrich then orders-processor within 10s367 - Sample order with status=PENDING is filtered out (no target invocation)368 - DLQ prod-pipe-dlq receives no messages under normal operation; inject poison record to verify DLQ369SOURCE: DynamoDB Streams arn:aws:dynamodb:us-east-1:111111111111:table/Orders/stream/2026-08-01 region us-east-1370FILTER: {"dynamodb":{"NewImage":{"status":{"S":"CONFIRMED"}}}}371ENRICHMENT: Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-enrich372TARGET: Lambda arn:aws:lambda:us-east-1:111111111111:function:orders-processor373BATCH: window 5s size 100 retry 3 age 3600s374DLQ: arn:aws:sqs:us-east-1:111111111111:prod-pipe-dlq (pipe-level)375NOTES:376 - Filter selectivity ~30% (only CONFIRMED orders reach enrichment). Estimate target invocations = source records x 0.30.377 - Enrichment runs on full batch of up to 100 records; throws on any record -> entire batch retried.378 - OnPartialBatchItemFailure=AUTOMATIC_BISECT: poison record isolated via bisection within 3-4 retries.379 - Cost: $0.50/mo per pipe base + $0.50 per million invocations (DDB Streams throughput-priced separately).380```381382## NEVER (top 5)383384These are the highest-impact, most-frequent failure modes in385EventBridge Pipes deployments. Violating any one of these is a386correctness or security regression.3873881. **NEVER rely on target's own event-source mapping.** A Pipe from389 DynamoDB Streams → Lambda does NOT use Lambda's390 `create-event-source-mapping`. The Pipe's own role reads the stream391 and invokes the target. Configuring both a Pipe AND a Lambda392 event-source mapping on the same stream double-delivers records.3933942. **NEVER configure a pipe-level `DeadLetterConfig` for an SQS source395 and expect it to catch poison messages.** For SQS sources, the DLQ396 is on the **source queue** via `RedrivePolicy` — the pipe-level397 `DeadLetterConfig` is silently ignored. Always configure the source398 queue's `RedrivePolicy` with `maxReceiveCount` for SQS-sourced pipes.3994003. **NEVER deploy without verifying the target resource policy grants401 invoke to `pipes.amazonaws.com` (or the pipe role ARN).** For Lambda,402 Step Functions, API Gateway targets, a missing resource-based policy403 causes silent invocation failures (visible only in CloudWatch metrics404 for the pipe). The IAM role alone is NOT sufficient for405 resource-based policy targets.4064074. **NEVER set `MaximumBatchingWindowInSeconds` > 0 for latency-critical408 SQS workloads without measuring.** For SQS sources the batching409 window IS applied (despite general guidance that "SQS ignores it") —410 the higher the window, the longer the end-to-end latency. For SQS,411 prefer `BatchSize` alone with window=0 unless you specifically need412 batch coalescing.4134145. **NEVER deploy an MSK or self-managed Kafka source without an415 explicit `ConsumerGroupID`.** Two pipes sharing a consumer group416 split partitions between them (throughput halved per pipe); two417 pipes with different consumer groups each receive all records418 (duplicate processing). Pick the consumer group deliberately based419 on fan-out semantics.420421## Expert heuristic: when to use enrichment vs. inline target Lambda422423The enrichment-vs-inline-target decision table and rules moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).424Load on demand choosing where transformation logic belongs.425426## Recent AWS features (2024-2026)427428Recent AWS features (Batch target, enrichment transformations, AUTOMATIC_BISECT, self-managed Kafka, Amazon MQ, Redshift/SageMaker targets, API Destination) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).429Load on demand checking whether a newer AWS feature changes the plan.430431## AWS documentation432433- **AWS EventBridge Pipes User Guide** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html434- **EventBridge Pipes sources** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-source.html435- **EventBridge Pipes targets** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipe-targets.html436- **EventBridge Pipes enrichment** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-enrichment.html437- **Amazon MSK as a Pipe source** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-msk.html438- **Amazon MQ as a Pipe source** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-mq.html439- **Self-managed Kafka as a Pipe source** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-self-managed-kafka.html440- **EventBridge Pipes IAM** — https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-permissions.html441- **EventBridge Pipes API Reference** — https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_Operations_Amazon_EventBridge_Pipes.html442443## References (load on demand)444445- [references/worked-examples.md](references/worked-examples.md) — the common Pipe patterns and the PIPE_SPEC output-format template, moved from SKILL.md.446- [references/diagnostic-commands.md](references/diagnostic-commands.md) — live-account pre-flight verification commands (IAM, source/target/enrichment state, DLQ policy, MSK auth, MQ credentials), moved from SKILL.md.447- [references/advanced-patterns.md](references/advanced-patterns.md) — mindset, Step 0 expert knowledge, the enrichment-vs-inline-target heuristic, and recent AWS features, moved from SKILL.md.448- [references/iam-and-dlq-guide.md](references/iam-and-dlq-guide.md) — pipe role permission templates, plus the Step 7 trust-policy JSON and per-source/per-target permission matrices moved from SKILL.md.449- [references/sources-and-targets.md](references/sources-and-targets.md) — source/target matrices, batch behavior, filter pattern rules, MSK/MQ guides.