AWS EventBridge

Amazon EventBridge

Amazon EventBridge is a serverless event bus that allows your applications to asynchronously consume events from 3rd party SaaS offerings, AWS services, and other applications in your own infrastructure. It evolved from Amazon CloudWatch Events (official documentation). The EventBridge acts as broker that you can configure with your own rules to route events to the correct service.

For more information about AWS EventBridge please visit the official documentation.

The publishing of the events is implemented using the AWS PUT Events API.

When publishing events any of the entries inside of the Put request can fail. The response contains information about which entries were not successfully published. Currently, there are no retries supported apart from the configuration provided to the EventBridge client.

Adding Support for configurable retry behaviour as part of the connector may be part of a future release.

By default the client will publish to a default event bus, but normally you should publish to a specific event bus that you create.

An event bus name is defined per event in a PutEventsRequestEntry object. It would be possible to define helper flows/sinks with default values such as source and eventBusName. The detail is JSON as a string and detailType is the name of the event for rule matching.

The Alpakka AWS EventBridge connector provides Akka Stream flows and sinks to publish to AWS EventBridge event buses.

Project Info: Alpakka AWS EventBriged
Artifact
com.lightbend.akka
akka-stream-alpakka-aws-event-bridge
2.0.1
JDK versions
Adopt OpenJDK 8
Adopt OpenJDK 11
Scala versions2.12.10, 2.11.12, 2.13.1
JPMS module nameakka.stream.alpakka.aws.eventbrigde
License
Readiness level
Since 2.0.1, 2020-06-10
Home pagehttps://doc.akka.io/docs/alpakka/current
API documentation
Forums
Release notesIn the documentation
IssuesGithub issues
Sourceshttps://github.com/akka/alpakka

Artifacts

sbt
libraryDependencies += "com.lightbend.akka" %% "akka-stream-alpakka-aws-event-bridge" % "2.0.1"
Maven
<properties>
  <scala.binary.version>2.12</scala.binary.version>
</properties>
<dependency>
  <groupId>com.lightbend.akka</groupId>
  <artifactId>akka-stream-alpakka-aws-event-bridge_${scala.binary.version}</artifactId>
  <version>2.0.1</version>
</dependency>
Gradle
versions += [
  ScalaBinary: "2.12"
]
dependencies {
  compile group: 'com.lightbend.akka', name: "akka-stream-alpakka-aws-event-bridge_${versions.ScalaBinary}", version: '2.0.1'
}

The table below shows direct dependencies of this module and the second tab shows all libraries it depends on transitively.

Direct dependencies
OrganizationArtifactVersion
com.fasterxml.jackson.corejackson-core2.10.4
com.fasterxml.jackson.corejackson-databind2.10.4
com.github.matsluniaws-spi-akka-http_2.120.0.9
com.typesafe.akkaakka-http_2.1210.1.11
com.typesafe.akkaakka-stream_2.122.5.31
org.scala-langscala-library2.12.10
software.amazon.awssdkeventbridge2.11.3
Dependency tree
com.fasterxml.jackson.core    jackson-core    2.10.4
com.fasterxml.jackson.core    jackson-databind    2.10.4
    com.fasterxml.jackson.core    jackson-annotations    2.10.4
com.github.matsluni    aws-spi-akka-http_2.12    0.0.9
    software.amazon.awssdk    http-client-spi    2.11.4
        org.reactivestreams    reactive-streams    1.0.2
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
com.typesafe.akka    akka-http_2.12    10.1.11
    com.typesafe.akka    akka-http-core_2.12    10.1.11
        com.typesafe.akka    akka-parsing_2.12    10.1.11
com.typesafe.akka    akka-stream_2.12    2.5.31
    com.typesafe.akka    akka-actor_2.12    2.5.31
        com.typesafe    config    1.3.3
        org.scala-lang.modules    scala-java8-compat_2.12    0.8.0
    com.typesafe.akka    akka-protobuf_2.12    2.5.31
    com.typesafe    ssl-config-core_2.12    0.3.8
        com.typesafe    config    1.3.3
        org.scala-lang.modules    scala-parser-combinators_2.12    1.1.2
    org.reactivestreams    reactive-streams    1.0.2
org.scala-lang    scala-library    2.12.10
software.amazon.awssdk    eventbridge    2.11.3
    software.amazon.awssdk    annotations    2.11.4
    software.amazon.awssdk    auth    2.11.3
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    http-client-spi    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    profiles    2.11.3
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    regions    2.11.3
            com.fasterxml.jackson.core    jackson-annotations    2.10.4
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    sdk-core    2.11.3
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    http-client-spi    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    sdk-core    2.11.3
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
        software.amazon.eventstream    eventstream    1.0.1
    software.amazon.awssdk    aws-core    2.11.3
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    auth    2.11.3
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    regions    2.11.3
                com.fasterxml.jackson.core    jackson-annotations    2.10.4
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    sdk-core    2.11.3
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    http-client-spi    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    profiles    2.11.3
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    sdk-core    2.11.3
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    http-client-spi    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
            software.amazon.eventstream    eventstream    1.0.1
        software.amazon.awssdk    http-client-spi    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    profiles    2.11.3
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    regions    2.11.3
            com.fasterxml.jackson.core    jackson-annotations    2.10.4
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    sdk-core    2.11.3
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    http-client-spi    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    sdk-core    2.11.3
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
        software.amazon.eventstream    eventstream    1.0.1
    software.amazon.awssdk    aws-json-protocol    2.11.3
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    aws-core    2.11.3
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    auth    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    http-client-spi    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    regions    2.11.3
                    com.fasterxml.jackson.core    jackson-annotations    2.10.4
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    profiles    2.11.3
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    sdk-core    2.11.3
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    http-client-spi    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            software.amazon.awssdk    annotations    2.11.4
                            software.amazon.awssdk    utils    2.11.4
                                org.reactivestreams    reactive-streams    1.0.2
                                org.slf4j    slf4j-api    1.7.28
                                software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    profiles    2.11.3
                            software.amazon.awssdk    annotations    2.11.4
                            software.amazon.awssdk    utils    2.11.4
                                org.reactivestreams    reactive-streams    1.0.2
                                org.slf4j    slf4j-api    1.7.28
                                software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    sdk-core    2.11.3
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    http-client-spi    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    profiles    2.11.3
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
                software.amazon.eventstream    eventstream    1.0.1
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    regions    2.11.3
                com.fasterxml.jackson.core    jackson-annotations    2.10.4
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    sdk-core    2.11.3
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    http-client-spi    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    profiles    2.11.3
                        software.amazon.awssdk    annotations    2.11.4
                        software.amazon.awssdk    utils    2.11.4
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    sdk-core    2.11.3
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    http-client-spi    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
            software.amazon.eventstream    eventstream    1.0.1
        software.amazon.awssdk    http-client-spi    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    protocol-core    2.11.3
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    sdk-core    2.11.3
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    http-client-spi    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    profiles    2.11.3
                    software.amazon.awssdk    annotations    2.11.4
                    software.amazon.awssdk    utils    2.11.4
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    sdk-core    2.11.3
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
    software.amazon.awssdk    http-client-spi    2.11.4
        org.reactivestreams    reactive-streams    1.0.2
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
    software.amazon.awssdk    protocol-core    2.11.3
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    http-client-spi    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    sdk-core    2.11.3
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
    software.amazon.awssdk    regions    2.11.3
        com.fasterxml.jackson.core    jackson-annotations    2.10.4
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    profiles    2.11.3
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    sdk-core    2.11.3
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    http-client-spi    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    profiles    2.11.3
                software.amazon.awssdk    annotations    2.11.4
                software.amazon.awssdk    utils    2.11.4
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
    software.amazon.awssdk    sdk-core    2.11.3
        org.reactivestreams    reactive-streams    1.0.2
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    http-client-spi    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    profiles    2.11.3
            software.amazon.awssdk    annotations    2.11.4
            software.amazon.awssdk    utils    2.11.4
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.11.4
        software.amazon.awssdk    utils    2.11.4
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.11.4
    software.amazon.awssdk    utils    2.11.4
        org.reactivestreams    reactive-streams    1.0.2
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.11.4

Setup

Prepare an ActorSystem and a Materializer.

Scala
implicit val system: ActorSystem = ActorSystem()
implicit val mat: Materializer = ActorMaterializer()
Java
import akka.actor.ActorSystem;
import akka.stream.ActorMaterializer;
import akka.stream.Materializer;
ActorSystem system = ActorSystem.create();
Materializer materializer = ActorMaterializer.create(system);

This connector requires an EventBridge instance to communicate with AWS EventBridge.

It is your code’s responsibility to call close to free any resources held by the client. In this example it will be called when the actor system is terminated.

Scala
import java.net.URI

import com.github.matsluni.akkahttpspi.AkkaHttpClient
import software.amazon.awssdk.services.eventbridge.EventBridgeAsyncClient
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials
import software.amazon.awssdk.regions.Region

implicit val awsEventBridgeClient: EventBridgeAsyncClient =
  EventBridgeAsyncClient
    .builder()
    .credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x")))
    .endpointOverride(URI.create(endEndpoint))
    .region(Region.EU_CENTRAL_1)
    .httpClient(AkkaHttpClient.builder().withActorSystem(system).build())
    .build()

system.registerOnTermination(awsEventBridgeClient.close())
Java
import java.net.URI;
import com.github.matsluni.akkahttpspi.AkkaHttpClient;
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.eventbridge.EventBridgeAsyncClient;

final EventBridgeAsyncClient awsClient =
    EventBridgeAsyncClient.builder()
        .credentialsProvider(
            StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x")))
        .endpointOverride(URI.create(endpoint))
        .region(Region.EU_CENTRAL_1)
        .httpClient(AkkaHttpClient.builder().withActorSystem(system).build())
        .build();

system.registerOnTermination(() -> awsClient.close());

The example above uses Akka HTTP as the default HTTP client implementation. For more details about the HTTP client, configuring request retrying and best practices for credentials, see AWS client configuration.

Publish messages to AWS EventBridge Event Bus

Create a PutEventsEntry-accepting sink, publishing to an event bus.

Scala
Source
  .single(PutEventsRequestEntry.builder().detail("string").build())
  .runWith(EventBridgePublisher.sink())
Java
Source.single(detailEntry("message"))
    .runWith(EventBridgePublisher.sink(eventBridgeClient), materializer);

Create a sink that accepts PutEventsRequestEntries to be published to an Event Bus.

Scala
Source
  .single(PutEventsRequest.builder().entries(PutEventsRequestEntry.builder().detail("string").build()).build())
  .runWith(EventBridgePublisher.publishSink())
Java
Source.single(detailPutEventsRequest("message"))
    .runWith(EventBridgePublisher.publishSink(eventBridgeClient), materializer);

You can also build flow stages which publish messages to Event Bus and then forward PutEventsResponse further down the stream.

Flow for PutEventEntry.

Scala
Source
  .single(PutEventsRequestEntry.builder().detail("string").build())
  .via(EventBridgePublisher.flow())
  .runWith(Sink.foreach(res => println(res)))
Java
Source.single(detailEntry("message"))
    .via(EventBridgePublisher.flow(eventBridgeClient))
    .runWith(Sink.foreach(res -> System.out.println(res)), materializer);

Flow for PutEventsRequest.

Scala
Source
  .single(PutEventsRequest.builder().entries(PutEventsRequestEntry.builder().detail("string").build()).build())
  .via(EventBridgePublisher.publishFlow())
  .runWith(Sink.foreach(res => println(res)))
Java
Source.single(detailPutEventsRequest("message"))
    .via(EventBridgePublisher.publishFlow(eventBridgeClient))
    .runWith(Sink.foreach(res -> System.out.println(res)), materializer);

Flow supporting a list of PutEventEntry objects.

Messages published in a batch using EventBridgePublisher.flowSeqEventBridgePublisher.flowSeq are not published in an “all or nothing” manner. Event Bridge will process each event independently. Retries of the failed messages in the PutEventsResponse are not yet implemented.

Integration testing

For integration testing without connecting directly to Amazon EventBridge, Alpakka uses Localstack, which comes as a docker image - and has a corresponding service amazoneventbridge in the docker-compose.yml file. Which needs to be started before running the integration tests docker-compose up amazoneventbridge.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.