AwsEventbridgePipe

Creates an AWS EventBridge Pipe connecting a source to a target with optional filtering, enrichment, and logging.

Remarks

Wraps aws.pipes.Pipe. The pipe name is derived deterministically from the project hash and stack name:

  • Pulumi logical name: ${environmentCode}-${projectHash}-eventbridge-pipe-${sanitisedName} from args.name.
  • AWS provider name: built from args.name through the naming-style prefix pattern.

Supported sources: SQS, DynamoDB Streams, Kinesis Data Streams, Amazon MSK, self-managed Kafka, Amazon MQ ActiveMQ, Amazon MQ RabbitMQ.

Supported targets: SQS, Lambda, Step Functions, ECS tasks, EventBridge event bus, Kinesis Data Streams, CloudWatch Logs, Redshift Data API, HTTP (API Gateway / ApiDestination).

Log destination: CloudWatch Logs only.

Naming:

  • Root type ${namespace}:aws:AwsEventbridgePipe has capability eventbridge-pipe and SHARED identity args.name; target ${env}-${projectHash}-eventbridge-pipe-${sanitiseNamePart(args.name)}.
  • Child aws:pipes/pipe:Pipe has tuple [args.name], yielding ${env}-${projectHash}-${sanitiseNamePart(args.name)}.
  • Provider name uses args.name with stackAndPurpose, limited to 51 characters for AWS's 64-character limit.

Example

CODE
const pipe = new AwsEventbridgePipe({
  name: 'ordersPipe',
  iamRole: pipeRole.arn,
  source: sourceQueue.arn,
  target: targetQueue.arn,
  description: 'Routes order events from SQS to SQS',
  desiredState: 'RUNNING',
  sourceParameters: {
    filterCriteria: {
      filters: [{ pattern: JSON.stringify({ source: ['myapp.orders'] }) }],
    },
    sqsQueue: { batchSize: 10, maximumBatchingWindowInSeconds: 30 },
  },
  targetParameters: {
    sqsQueue: { messageGroupId: 'orders' },
  },
  logConfiguration: {
    level: 'INFO',
    includeExecutionData: true,
    cloudwatchLogs: { logGroupArn: logGroup.arn },
  },
});

export const pipeArn = pipe.arn;
CODE
const pipe = new AwsEventbridgePipe({
  name: 'kinesisToLambda',
  iamRole: pipeRole.arn,
  source: kinesisStream.arn,
  target: processOrderFn.arn,
  enrichment: apiDestination.arn,
  enrichmentParameters: {
    httpParameters: { headerParameters: { 'x-env': 'prod' } },
  },
  sourceParameters: {
    kinesisStream: { startingPosition: 'LATEST', batchSize: 100 },
  },
  targetParameters: {
    lambda: { invocationType: 'FIRE_AND_FORGET' },
  },
});

Constructors

new AwsEventbridgePipe( args: AwsEventbridgePipeArgs, options?: ComponentResourceOptions, ): AwsEventbridgePipe

Parameters

  • args (AwsEventbridgePipeArgs) — Component inputs; args.name is the shared provider-purpose and logical-root identity.
  • options (ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.

Returns

AwsEventbridgePipe

Hierarchy

  • ComponentResource
  • AwsEventbridgePipe

Properties

arn: Output<string>

readonly

The ARN of the pipe.

pipe: Pipe

readonly

The underlying AWS EventBridge Pipe resource.

urn: Output<string>

readonly

Inherited from urn

The stable logical URN used to distinctly address a resource, both before and after deployments.

Methods

getData(): Promise<any>

protectedasync

Inherited from getData

Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.

Returns

  • Promise<any>

getProvider(moduleMember: string): ProviderResource | undefined

Inherited from getProvider

Returns the provider for the given module member, if one exists.

Parameters

  • moduleMember (string)

Returns

  • ProviderResource | undefined

initialize( args: Inputs, opts?: ComponentResourceOptions, name?: string, type?: string, ): Promise<any>

protectedasync

Inherited from initialize

Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.

Parameters

  • args (Inputs)
  • opts (ComponentResourceOptions, optional)
  • name (string, optional)
  • type (string, optional)

Returns

  • Promise<any>

registerOutputs( outputs?: Inputs | Promise<Inputs> | Output<Inputs>, ): void

protected

Inherited from registerOutputs

Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

Parameters

  • outputs (Inputs | Promise<Inputs> | Output<Inputs>, optional)

Returns

  • void

Static Methods

isInstance(obj: any): obj is ComponentResource<any>

static

Inherited from isInstance

Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

Parameters

  • obj (any)

Returns

  • obj is ComponentResource<any>