@aws-cdk/aws-pipes-enrichments-alpha

中文文档
2.275.0-alpha.0发布于 2026/10/27Apache-2.0TypeScriptCommonJS零依赖近 30 天下载 5021

The CDK Construct Library for Amazon EventBridge Pipes Enrichments

原始使用文档
文档目录5 节
  1. Pipe sources
  2. Lambda function
  3. Step Functions state machine
  4. API destination
  5. API Gateway (REST API)

Amazon EventBridge Pipes Enrichments Construct Library


cdk-constructs: Experimental

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


EventBridge Pipes Enrichments let you create enrichments for an EventBridge Pipe.

For more details see the service documentation:

Documentation

Pipe sources

Pipe enrichments are invoked prior to sending the events to a target of a EventBridge Pipe.

Lambda function

A Lambda function can be used to enrich events of a pipe.

declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;

declare const enrichmentFunction: lambda.Function;

const enrichment = new enrichments.LambdaEnrichment(enrichmentFunction);

const pipe = new pipes.Pipe(this, 'Pipe', {
  source: new SomeSource(sourceQueue),
  enrichment,
  target: new SomeTarget(targetQueue),
});

Step Functions state machine

Step Functions state machine can be used to enrich events of a pipe.

Note: EventBridge Pipes only supports Express workflows invoked synchronously.

Visit Amazon EventBridge Pipes event enrichment for more details.

declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;

declare const enrichmentStateMachine: stepfunctions.StateMachine;

const enrichment = new enrichments.StepFunctionsEnrichment(enrichmentStateMachine);

const pipe = new pipes.Pipe(this, 'Pipe', {
  source: new SomeSource(sourceQueue),
  enrichment,
  target: new SomeTarget(targetQueue),
});

API destination

API destination can be used to enrich events of a pipe.

declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;

declare const apiDestination: events.ApiDestination;

const enrichment = new enrichments.ApiDestinationEnrichment(apiDestination);

const pipe = new pipes.Pipe(this, 'Pipe', {
  source: new SomeSource(sourceQueue),
  enrichment,
  target: new SomeTarget(targetQueue),
});

API Gateway (REST API)

API Gateway can be used to enrich events of a pipe. Pipes only supports API Gateway REST APIs. HTTP APIs are not supported.

declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;

declare const restApi: apigateway.RestApi;

const enrichment = new enrichments.ApiGatewayEnrichment(restApi);

const pipe = new pipes.Pipe(this, 'Pipe', {
  source: new SomeSource(sourceQueue),
  enrichment,
  target: new SomeTarget(targetQueue),
});

版本与发布记录

@aws-cdk/aws-pipes-enrichments-alpha 共发布 196 个版本,首次发布于 2024/02/15;过去 12 个月发布了 64 个版本。

版本发布日期距今
2.275.0-alpha.0latest2026/10/2712 天前
2.274.0-alpha.02026/10/2018 天前
2.273.0-alpha.02026/10/0930 天前
2.272.0-alpha.02026/09/301 个月前
2.271.0-alpha.02026/09/261 个月前
2.270.0-alpha.02026/09/181 个月前

关于 @aws-cdk/aws-pipes-enrichments-alpha 的常见问题

@aws-cdk/aws-pipes-enrichments-alpha 是什么?

The CDK Construct Library for Amazon EventBridge Pipes Enrichments

如何安装 @aws-cdk/aws-pipes-enrichments-alpha?

在项目目录运行 npm install @aws-cdk/aws-pipes-enrichments-alpha,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:constructs(^10.5.0)、aws-cdk-lib(^2.275.0)、@aws-cdk/aws-pipes-alpha(2.275.0-alpha.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@aws-cdk/aws-pipes-enrichments-alpha 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aws-cdk/aws-pipes-enrichments-alpha 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aws-cdk/aws-pipes-enrichments-alpha 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@aws-cdk/aws-pipes-enrichments-alpha 可以商用吗?

@aws-cdk/aws-pipes-enrichments-alpha 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aws-cdk/aws-pipes-enrichments-alpha 的下载量有多少?

根据 npm 官方下载统计,@aws-cdk/aws-pipes-enrichments-alpha 在 2026/10/08 – 2026/11/06 这 30 天内被下载 5,021 次,日均约 167 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aws-cdk/aws-pipes-enrichments-alpha 还在维护吗?

最新版本 2.275.0-alpha.0 发布于 2026/10/27(12 天前);至今共发布 196 个版本,其中过去 12 个月发布了 64 个;首次发布于 2024/02/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。