AWS DynamoDB

The AWS DynamoDB connector provides a flow for streaming DynamoDB requests. For more information about DynamoDB please visit the official documentation.

Project Info: Alpakka DynamoDB
Artifact
com.lightbend.akka
akka-stream-alpakka-dynamodb
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.dynamodb
License
Readiness level
Since 0.5, 2017-01-13
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.31"
val AkkaHttpVersion = "10.1.11"
libraryDependencies ++= Seq(
  "com.lightbend.akka" %% "akka-stream-alpakka-dynamodb" % "2.0.1",
  "com.typesafe.akka" %% "akka-stream" % AkkaVersion,
  "com.typesafe.akka" %% "akka-http" % AkkaHttpVersion
)
Maven
<properties>
  <akka.version>2.5.31</akka.version>
  <akka.http.version>10.1.11</akka.http.version>
  <scala.binary.version>2.12</scala.binary.version>
</properties>
<dependency>
  <groupId>com.lightbend.akka</groupId>
  <artifactId>akka-stream-alpakka-dynamodb_${scala.binary.version}</artifactId>
  <version>2.0.1</version>
</dependency>
<dependency>
  <groupId>com.typesafe.akka</groupId>
  <artifactId>akka-stream_${scala.binary.version}</artifactId>
  <version>${akka.version}</version>
</dependency>
<dependency>
  <groupId>com.typesafe.akka</groupId>
  <artifactId>akka-http_${scala.binary.version}</artifactId>
  <version>${akka.http.version}</version>
</dependency>
Gradle
versions += [
  AkkaVersion: "2.5.31",
  AkkaHttpVersion: "10.1.11",
  ScalaBinary: "2.12"
]
dependencies {
  compile group: 'com.lightbend.akka', name: "akka-stream-alpakka-dynamodb_${versions.ScalaBinary}", version: '2.0.1',
  compile group: 'com.typesafe.akka', name: "akka-stream_${versions.ScalaBinary}", version: versions.AkkaVersion,
  compile group: 'com.typesafe.akka', name: "akka-http_${versions.ScalaBinary}", 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.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.awssdkdynamodb2.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    dynamodb    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    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    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

This connector requires a DynamoDbAsyncClient instance to communicate with AWS DynamoDB.

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 akka.actor.ActorSystem
import akka.stream.{ActorMaterializer, Materializer}

import com.github.matsluni.akkahttpspi.AkkaHttpClient
import software.amazon.awssdk.auth.credentials.{AwsBasicCredentials, StaticCredentialsProvider}
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient


// Don't encode credentials in your source code!
// see https://doc.akka.io/docs/alpakka/current/aws-shared-configuration.html
private val credentialsProvider = StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x"))
implicit val client: DynamoDbAsyncClient = DynamoDbAsyncClient
  .builder()
  .region(Region.AWS_GLOBAL)
  .credentialsProvider(credentialsProvider)
  .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(client.close())
Java
import akka.actor.ActorSystem;
import akka.japi.Pair;
import akka.stream.ActorMaterializer;
import akka.stream.Materializer;

import com.github.matsluni.akkahttpspi.AkkaHttpClient;
import scala.util.Try;
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.dynamodb.DynamoDbAsyncClient;

final ActorSystem system = ActorSystem.create();
final Materializer materializer = ActorMaterializer.create(system);

// 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 DynamoDbAsyncClient client =
    DynamoDbAsyncClient.builder()
        .credentialsProvider(credentialsProvider)
        .region(Region.AWS_GLOBAL)
        .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(() -> client.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.

Sending requests and receiving responses

For simple operations you can issue a single request, and get back the result in a FutureCompletionStage.

Scala
val listTablesResult: Future[ListTablesResponse] =
  DynamoDb.single(ListTablesRequest.builder().build())
Java
final CompletionStage<ListTablesResponse> listTables =
    DynamoDb.single(
        client, DynamoDbOp.listTables(), ListTablesRequest.builder().build(), materializer);

You can also get the response to a request as an element emitted from a Flow:

Scala
val source: Source[DescribeTableResponse, NotUsed] = Source
  .single(CreateTableRequest.builder().tableName("testTable").build())
  .via(DynamoDb.flow(parallelism = 1))
  .map(response => DescribeTableRequest.builder().tableName(response.tableDescription.tableName).build())
  .via(DynamoDb.flow(parallelism = 1))
Java
Source<DescribeTableResponse, NotUsed> tableArnSource =
    Source.single(CreateTableRequest.builder().tableName("testTable").build())
        .via(DynamoDb.flow(client, DynamoDbOp.createTable(), 1))
        .map(
            result ->
                DescribeTableRequest.builder()
                    .tableName(result.tableDescription().tableName())
                    .build())
        .via(DynamoDb.flow(client, DynamoDbOp.describeTable(), 1));

Flow with context

The flowWithContext allows to send an arbitrary value, such as commit handles for JMS or Kafka, past the DynamoDb operation. The responses are wrapped in a Try to differentiate between successful operations and errors in-stream.

Scala
val source: SourceWithContext[PutItemRequest, SomeContext, NotUsed] = // ???

val flow: FlowWithContext[PutItemRequest, SomeContext, Try[PutItemResponse], SomeContext, NotUsed] =
  DynamoDb.flowWithContext(parallelism = 1)

val writtenSource: SourceWithContext[PutItemResponse, SomeContext, NotUsed] = source
  .via(flow)
  .map {
    case Success(response) => response
    case Failure(exception) => throw exception
  }
Java
SourceWithContext<PutItemRequest, SomeContext, NotUsed> source = // ???

FlowWithContext<PutItemRequest, SomeContext, Try<PutItemResponse>, SomeContext, NotUsed> flow =
    DynamoDb.flowWithContext(client, DynamoDbOp.putItem(), 1);

SourceWithContext<PutItemResponse, SomeContext, NotUsed> writtenSource =
    source
        .via(flow)
        .map(
            result -> {
              if (result.isSuccess()) return result.get();
              else throw (Exception) result.failed().get();
            });

Pagination

The DynamoDB operations BatchGetItem, ListTables, Query and Scan allow paginating of results. The requests with paginated results can be used as source or in a flow with flowPaginated:

Scala
val scanRequest = ScanRequest.builder().tableName("testTable").build()

val scanPages: Source[ScanResponse, NotUsed] =
  DynamoDb.source(scanRequest)

val scanPageInFlow: Source[ScanResponse, NotUsed] =
  Source
    .single(scanRequest)
    .via(DynamoDb.flowPaginated())
Java
ScanRequest scanRequest = ScanRequest.builder().tableName("testTable").build();

Source<ScanResponse, NotUsed> scanPages =
    DynamoDb.source(client, DynamoDbOp.scan(), scanRequest);

Source<ScanResponse, NotUsed> scanPageInFlow =
    Source.single(scanRequest).via(DynamoDb.flowPaginated(client, DynamoDbOp.scan()));

Error Retries and Exponential Backoff

The AWS SDK 2 implements error retrying with exponential backoff which is configurable via the DynamoDbAsyncClient configuration by using the RetryPolicy in overrideConfiguration.

See AWS Retry configuration for more details.

Scala
implicit val client: DynamoDbAsyncClient = DynamoDbAsyncClient
  .builder()
  .region(Region.AWS_GLOBAL)
  .credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x")))
  .httpClient(AkkaHttpClient.builder().withActorSystem(system).build())
  .overrideConfiguration(
    ClientOverrideConfiguration
      .builder()
      .retryPolicy(
        // This example shows the AWS SDK 2 `RetryPolicy.defaultRetryPolicy()`
        // See https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/retry/RetryPolicy.html
        RetryPolicy.builder
          .backoffStrategy(BackoffStrategy.defaultStrategy)
          .throttlingBackoffStrategy(BackoffStrategy.defaultThrottlingStrategy)
          .numRetries(SdkDefaultRetrySetting.DEFAULT_MAX_RETRIES)
          .retryCondition(RetryCondition.defaultRetryCondition)
          .build
      )
      .build()
  )
  .build()
Java
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.dynamodb.DynamoDbAsyncClient;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.internal.retry.SdkDefaultRetrySetting;
import software.amazon.awssdk.core.retry.RetryPolicy;
import software.amazon.awssdk.core.retry.backoff.BackoffStrategy;
import software.amazon.awssdk.core.retry.conditions.RetryCondition;
final DynamoDbAsyncClient client =
    DynamoDbAsyncClient.builder()
        .region(Region.AWS_GLOBAL)
        .credentialsProvider(
            StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x")))
        .httpClient(AkkaHttpClient.builder().withActorSystem(system).build())
        .overrideConfiguration(
            ClientOverrideConfiguration.builder()
                .retryPolicy(
                    // This example shows the AWS SDK 2 `RetryPolicy.defaultRetryPolicy()`
                    // See
                    // https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/core/retry/RetryPolicy.html
                    RetryPolicy.builder()
                        .backoffStrategy(BackoffStrategy.defaultStrategy())
                        .throttlingBackoffStrategy(BackoffStrategy.defaultThrottlingStrategy())
                        .numRetries(SdkDefaultRetrySetting.DEFAULT_MAX_RETRIES)
                        .retryCondition(RetryCondition.defaultRetryCondition())
                        .build())
                .build())
        .build();
system.registerOnTermination(client::close);
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.