Package software.amazon.awscdk.services.pipes.targets.alpha


@Stability(Experimental) package software.amazon.awscdk.services.pipes.targets.alpha

Amazon EventBridge Pipes Targets 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 Targets let you create a target for a EventBridge Pipe.

For more details see the service documentation:

Documentation

Targets

Pipe targets are the end point of a EventBridge Pipe.

Amazon SQS

A SQS message queue can be used as a target for a pipe. Messages will be pushed to the queue.

 Queue sourceQueue;
 Queue targetQueue;
 
 
 SqsTarget pipeTarget = new SqsTarget(targetQueue);
 
 Pipe pipe = Pipe.Builder.create(this, "Pipe")
         .source(new SomeSource(sourceQueue))
         .target(pipeTarget)
         .build();
 

The target configuration can be transformed:

 Queue sourceQueue;
 Queue targetQueue;
 
 
 SqsTarget pipeTarget = SqsTarget.Builder.create(targetQueue)
         .inputTransformation(InputTransformation.fromObject(Map.of(
                 "SomeKey", DynamicInput.fromEventPath("$.body"))))
         .build();
 
 Pipe pipe = Pipe.Builder.create(this, "Pipe")
         .source(new SomeSource(sourceQueue))
         .target(pipeTarget)
         .build();