AWS SNS

The AWS SNS connector provides an Akka Stream Flow and Sink for push notifications through AWS SNS.

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

Project Info: Alpakka AWS SNS
Artifact
com.lightbend.akka
akka-stream-alpakka-sns
2.0.0-RC1
JDK versions
Adopt OpenJDK 8
Adopt OpenJDK 11
Scala versions2.12.10, 2.11.12, 2.13.1
JPMS module nameakka.stream.alpakka.aws.sns
License
Readiness level
Since 0.8, 2017-05-05
Home pagehttps://doc.akka.io/docs/alpakka/current
API documentation
Forums
Release notesIn the documentation
IssuesGithub issues
Sourceshttps://github.com/akka/alpakka

Artifacts

sbt
val AkkaVersion = "2.5.30"
val AkkaHttpVersion = "10.1.11"
libraryDependencies ++= Seq(
  "com.lightbend.akka" %% "akka-stream-alpakka-sns" % "2.0.0-RC1",
  "com.typesafe.akka" %% "akka-stream" % AkkaVersion,
  "com.typesafe.akka" %% "akka-http" % AkkaHttpVersion
)
Maven
<properties>
  <akka.version>2.5.30</akka.version>
  <akka.http.version>10.1.11</akka.http.version>
</properties>
<dependency>
  <groupId>com.lightbend.akka</groupId>
  <artifactId>akka-stream-alpakka-sns_2.12</artifactId>
  <version>2.0.0-RC1</version>
</dependency>
<dependency>
  <groupId>com.typesafe.akka</groupId>
  <artifactId>akka-stream_2.12</artifactId>
  <version>${akka.version}</version>
</dependency>
<dependency>
  <groupId>com.typesafe.akka</groupId>
  <artifactId>akka-http_2.12</artifactId>
  <version>${akka.http.version}</version>
</dependency>
Gradle
versions += [
  AkkaVersion: "2.5.30",
  AkkaHttpVersion: "10.1.11"
]
dependencies {
  compile group: 'com.lightbend.akka', name: 'akka-stream-alpakka-sns_2.12', version: '2.0.0-RC1',
  compile group: 'com.typesafe.akka', name: 'akka-stream_2.12', version: versions.AkkaVersion,
  compile group: 'com.typesafe.akka', name: 'akka-http_2.12', version: versions.AkkaHttpVersion
}

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.0
com.fasterxml.jackson.corejackson-databind2.10.0
com.github.matsluniaws-spi-akka-http_2.120.0.7
com.typesafe.akkaakka-http_2.1210.1.11
com.typesafe.akkaakka-stream_2.122.5.30
org.scala-langscala-library2.12.10
software.amazon.awssdksns2.10.60
Dependency tree
com.fasterxml.jackson.core    jackson-core    2.10.0
com.fasterxml.jackson.core    jackson-databind    2.10.0
    com.fasterxml.jackson.core    jackson-annotations    2.10.0
com.github.matsluni    aws-spi-akka-http_2.12    0.0.7
    software.amazon.awssdk    http-client-spi    2.10.60
        org.reactivestreams    reactive-streams    1.0.2
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
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.30
    com.typesafe.akka    akka-actor_2.12    2.5.30
        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.30
    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    sns    2.10.60
    software.amazon.awssdk    annotations    2.10.60
    software.amazon.awssdk    auth    2.10.60
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    http-client-spi    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    profiles    2.10.60
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    regions    2.10.60
            com.fasterxml.jackson.core    jackson-annotations    2.10.0
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    sdk-core    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    http-client-spi    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    sdk-core    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
        software.amazon.eventstream    eventstream    1.0.1
    software.amazon.awssdk    aws-core    2.10.60
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    auth    2.10.60
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    regions    2.10.60
                com.fasterxml.jackson.core    jackson-annotations    2.10.0
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    sdk-core    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    http-client-spi    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    profiles    2.10.60
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    sdk-core    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    http-client-spi    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
            software.amazon.eventstream    eventstream    1.0.1
        software.amazon.awssdk    http-client-spi    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    regions    2.10.60
            com.fasterxml.jackson.core    jackson-annotations    2.10.0
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    sdk-core    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    http-client-spi    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    sdk-core    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
        software.amazon.eventstream    eventstream    1.0.1
    software.amazon.awssdk    aws-query-protocol    2.10.60
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    aws-core    2.10.60
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    auth    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    http-client-spi    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    regions    2.10.60
                    com.fasterxml.jackson.core    jackson-annotations    2.10.0
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    profiles    2.10.60
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    sdk-core    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    http-client-spi    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            software.amazon.awssdk    annotations    2.10.60
                            software.amazon.awssdk    utils    2.10.60
                                org.reactivestreams    reactive-streams    1.0.2
                                org.slf4j    slf4j-api    1.7.28
                                software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    profiles    2.10.60
                            software.amazon.awssdk    annotations    2.10.60
                            software.amazon.awssdk    utils    2.10.60
                                org.reactivestreams    reactive-streams    1.0.2
                                org.slf4j    slf4j-api    1.7.28
                                software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    sdk-core    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    http-client-spi    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    profiles    2.10.60
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
                software.amazon.eventstream    eventstream    1.0.1
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    regions    2.10.60
                com.fasterxml.jackson.core    jackson-annotations    2.10.0
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    sdk-core    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    http-client-spi    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    profiles    2.10.60
                        software.amazon.awssdk    annotations    2.10.60
                        software.amazon.awssdk    utils    2.10.60
                            org.reactivestreams    reactive-streams    1.0.2
                            org.slf4j    slf4j-api    1.7.28
                            software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    sdk-core    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    http-client-spi    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
            software.amazon.eventstream    eventstream    1.0.1
        software.amazon.awssdk    http-client-spi    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    protocol-core    2.10.60
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    sdk-core    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    http-client-spi    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    profiles    2.10.60
                    software.amazon.awssdk    annotations    2.10.60
                    software.amazon.awssdk    utils    2.10.60
                        org.reactivestreams    reactive-streams    1.0.2
                        org.slf4j    slf4j-api    1.7.28
                        software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    sdk-core    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
    software.amazon.awssdk    http-client-spi    2.10.60
        org.reactivestreams    reactive-streams    1.0.2
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
    software.amazon.awssdk    protocol-core    2.10.60
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    http-client-spi    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    sdk-core    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
    software.amazon.awssdk    regions    2.10.60
        com.fasterxml.jackson.core    jackson-annotations    2.10.0
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    profiles    2.10.60
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    sdk-core    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    http-client-spi    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    profiles    2.10.60
                software.amazon.awssdk    annotations    2.10.60
                software.amazon.awssdk    utils    2.10.60
                    org.reactivestreams    reactive-streams    1.0.2
                    org.slf4j    slf4j-api    1.7.28
                    software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
    software.amazon.awssdk    sdk-core    2.10.60
        org.reactivestreams    reactive-streams    1.0.2
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    http-client-spi    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    profiles    2.10.60
            software.amazon.awssdk    annotations    2.10.60
            software.amazon.awssdk    utils    2.10.60
                org.reactivestreams    reactive-streams    1.0.2
                org.slf4j    slf4j-api    1.7.28
                software.amazon.awssdk    annotations    2.10.60
        software.amazon.awssdk    utils    2.10.60
            org.reactivestreams    reactive-streams    1.0.2
            org.slf4j    slf4j-api    1.7.28
            software.amazon.awssdk    annotations    2.10.60
    software.amazon.awssdk    utils    2.10.60
        org.reactivestreams    reactive-streams    1.0.2
        org.slf4j    slf4j-api    1.7.28
        software.amazon.awssdk    annotations    2.10.60

Setup

This connector requires an implicit SnsAsyncClient instance to communicate with AWS SQS.

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.sns.SnsAsyncClient
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials
import software.amazon.awssdk.regions.Region

// Don't encode credentials in your source code!
// see https://doc.akka.io/docs/alpakka/current/aws-shared-configuration.html
val credentialsProvider = StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x"))
implicit val awsSnsClient: SnsAsyncClient =
  SnsAsyncClient
    .builder()
    .credentialsProvider(credentialsProvider)
    .region(Region.EU_CENTRAL_1)
    .httpClient(AkkaHttpClient.builder().withActorSystem(system).build())
    // Possibility to configure the retry policy
    // see https://doc.akka.io/docs/alpakka/current/aws-shared-configuration.html
    // .overrideConfiguration(...)
    .build()

system.registerOnTermination(awsSnsClient.close())
Java
import java.net.URI;
import com.github.matsluni.akkahttpspi.AkkaHttpClient;
import org.junit.Rule;
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.sns.SnsAsyncClient;

// Don't encode credentials in your source code!
// see https://doc.akka.io/docs/alpakka/current/aws-shared-configuration.html
StaticCredentialsProvider credentialsProvider =
    StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x"));
final SnsAsyncClient awsSnsClient =
    SnsAsyncClient.builder()
        .credentialsProvider(credentialsProvider)
        .region(Region.EU_CENTRAL_1)
        .httpClient(AkkaHttpClient.builder().withActorSystem(system).build())
        // Possibility to configure the retry policy
        // see https://doc.akka.io/docs/alpakka/current/aws-shared-configuration.html
        // .overrideConfiguration(...)
        .build();

system.registerOnTermination(() -> awsSnsClient.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 for more details.

We will also need an ActorSystemActorSystem and an MaterializerMaterializer.

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

This is all preparation that we are going to need.

Publish messages to an SNS topic

Now we can publish a message to any SNS topic where we have access to by providing the topic ARN to the SnsPublisherSnsPublisher Flow or Sink factory method.

Using a Flow

Scala
Source
  .single("message")
  .via(SnsPublisher.flow(topicArn))
  .runWith(Sink.foreach(res => println(res.messageId())))

Source
  .single(PublishRequest.builder().message("message").build())
  .via(SnsPublisher.publishFlow(topicArn))
  .runWith(Sink.foreach(res => println(res.messageId())))

Source
  .single(PublishRequest.builder().message("message").topicArn(topicArn).build())
  .via(SnsPublisher.publishFlow())
  .runWith(Sink.foreach(res => println(res.messageId())))
Java
Source.single("message")
    .via(SnsPublisher.createFlow(topicArn, snsClient))
    .runWith(Sink.foreach(res -> System.out.println(res.messageId())), materializer);

Source.single(PublishRequest.builder().message("message").build())
    .via(SnsPublisher.createPublishFlow(topicArn, snsClient))
    .runWith(Sink.foreach(res -> System.out.println(res.messageId())), materializer);

Source.single(PublishRequest.builder().message("message").topicArn(topicArn).build())
    .via(SnsPublisher.createPublishFlow(snsClient))
    .runWith(Sink.foreach(res -> System.out.println(res.messageId())), materializer);

As you can see, this would publish the messages from the source to the specified AWS SNS topic. After a message has been successfully published, a PublishResult will be pushed downstream.

Using a Sink

Scala
Source
  .single("message")
  .runWith(SnsPublisher.sink(topicArn))

Source
  .single(PublishRequest.builder().message("message").build())
  .runWith(SnsPublisher.publishSink(topicArn))

Source
  .single(PublishRequest.builder().message("message").topicArn(topicArn).build())
  .runWith(SnsPublisher.publishSink())
Java
Source.single("message")
    .runWith(SnsPublisher.createSink(topicArn, snsClient), materializer);

Source.single(PublishRequest.builder().message("message").build())
    .runWith(SnsPublisher.createPublishSink(topicArn, snsClient), materializer);

Source.single(PublishRequest.builder().message("message").topicArn(topicArn).build())
    .runWith(SnsPublisher.createPublishSink(snsClient), materializer);

As you can see, this would publish the messages from the source to the specified AWS SNS topic.

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.