AWS.Pipes reference
DescribePipe
Section titled “DescribePipe”Source:
src/AWS/Pipes/DescribePipe.ts
Runtime binding for pipes:DescribePipe.
Reads the bound Pipe’s full definition and live state
(CurrentState, DesiredState, source/enrichment/target parameters) —
e.g. an operational dashboard or a controller that checks whether the
pipe settled after a start/stop. The pipe name is injected from the
binding. Provide the implementation with
Effect.provide(AWS.Pipes.DescribePipeHttp).
DescribePipe: Observing a Pipe
Section titled “DescribePipe: Observing a Pipe”// init — bind the operation to the pipeconst describePipe = yield* AWS.Pipes.DescribePipe(pipe);
// runtimeconst described = yield* describePipe();// described.CurrentState === "RUNNING"ListPipes
Section titled “ListPipes”Source:
src/AWS/Pipes/ListPipes.ts
Runtime binding for pipes:ListPipes.
Lists the account’s pipes, optionally filtered by name prefix, current
state, or source/target prefix — e.g. an operational console enumerating
the pipes it manages. Account-level: no resource argument. Provide the
implementation with Effect.provide(AWS.Pipes.ListPipesHttp).
ListPipes: Observing a Pipe
Section titled “ListPipes: Observing a Pipe”// init — account-level binding, no resource argumentconst listPipes = yield* AWS.Pipes.ListPipes();
// runtimeconst { Pipes } = yield* listPipes({ NamePrefix: "orders-" });// [{ Name: "orders-pipe", CurrentState: "RUNNING", ... }, ...]Source:
src/AWS/Pipes/Pipe.ts
An Amazon EventBridge Pipe — point-to-point source→(filter)→(enrich)→target plumbing between AWS services without glue code.
Pipe owns the lifecycle of an EventBridge Pipe. Reconcile waits (bounded)
for the pipe to leave its CREATING/UPDATING transitional states, and a
pipe that lands in a *_FAILED state surfaces as a typed PipeFailed
error rather than hanging. Prefer the from builder for the common
pairs — it synthesizes the pipes.amazonaws.com execution role with
source-read and target-invoke policies for you.
Pipe: Creating Pipes
Section titled “Pipe: Creating Pipes”SQS to Lambda (builder — role synthesized automatically)
import * as AWS from "alchemy/AWS";
const queue = yield* AWS.SQS.Queue("OrdersQueue");const pipe = yield* AWS.Pipes.from(queue, { batchSize: 1 }).toLambda(fn);SQS to SQS (canonical resource with an explicit role)
const pipe = yield* AWS.Pipes.Pipe("OrdersPipe", { source: source.queueArn, target: target.queueArn, roleArn: role.roleArn, sourceParameters: { SqsQueueParameters: { BatchSize: 1 }, },});Pipe: Filtering
Section titled “Pipe: Filtering”const pipe = yield* AWS.Pipes.from(queue) .filter(JSON.stringify({ body: { type: ["order.created"] } })) .toLambda(fn);Pipe: Enrichment
Section titled “Pipe: Enrichment”const pipe = yield* AWS.Pipes.from(queue) .enrich(enricherFn) .toQueue(target);Pipe: Stream Sources
Section titled “Pipe: Stream Sources”Kinesis stream source
const pipe = yield* AWS.Pipes.from(stream, { startingPosition: "TRIM_HORIZON", batchSize: 10,}).toLambda(fn);Stop a pipe without deleting it
const pipe = yield* AWS.Pipes.Pipe("OrdersPipe", { source: source.queueArn, target: target.queueArn, roleArn: role.roleArn, desiredState: "STOPPED",});StartPipe
Section titled “StartPipe”Source:
src/AWS/Pipes/StartPipe.ts
Runtime binding for pipes:StartPipe.
Starts the bound Pipe after it was stopped — e.g. resuming
source polling on a schedule or in response to an operational signal.
The response reports the transitional STARTING/desired RUNNING
states; use DescribePipe to observe when the pipe settles. The
pipe name is injected from the binding. Provide the implementation with
Effect.provide(AWS.Pipes.StartPipeHttp).
StartPipe: Controlling a Pipe
Section titled “StartPipe: Controlling a Pipe”// init — bind the operation to the pipeconst startPipe = yield* AWS.Pipes.StartPipe(pipe);
// runtimeconst response = yield* startPipe();// response.DesiredState === "RUNNING"StopPipe
Section titled “StopPipe”Source:
src/AWS/Pipes/StopPipe.ts
Runtime binding for pipes:StopPipe.
Stops the bound Pipe without deleting it — e.g. pausing source
polling during a maintenance window or in response to a poison-pill
backlog. The response reports the transitional STOPPING/desired
STOPPED states; use DescribePipe to observe when the pipe
settles. The pipe name is injected from the binding. Provide the
implementation with Effect.provide(AWS.Pipes.StopPipeHttp).
StopPipe: Controlling a Pipe
Section titled “StopPipe: Controlling a Pipe”// init — bind the operation to the pipeconst stopPipe = yield* AWS.Pipes.StopPipe(pipe);
// runtimeconst response = yield* stopPipe();// response.DesiredState === "STOPPED"