{"id":19502306,"url":"https://github.com/zio/zio-dynamodb","last_synced_at":"2025-09-12T13:36:21.630Z","repository":{"id":37015025,"uuid":"263660706","full_name":"zio/zio-dynamodb","owner":"zio","description":"Simple, type-safe, and efficient access to DynamoDB","archived":false,"fork":false,"pushed_at":"2025-09-06T05:46:37.000Z","size":1783,"stargazers_count":41,"open_issues_count":28,"forks_count":21,"subscribers_count":4,"default_branch":"series/2.x","last_synced_at":"2025-09-06T07:21:38.805Z","etag":null,"topics":["dynamodb","scala","zio"],"latest_commit_sha":null,"homepage":"https://zio.dev/zio-dynamodb","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-13T14:54:45.000Z","updated_at":"2025-07-26T09:03:41.000Z","dependencies_parsed_at":"2023-11-19T15:37:20.642Z","dependency_job_id":"fe80d861-ac9b-41b3-87ae-bb7d395230f2","html_url":"https://github.com/zio/zio-dynamodb","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/zio/zio-dynamodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-dynamodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-dynamodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-dynamodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-dynamodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zio","download_url":"https://codeload.github.com/zio/zio-dynamodb/tar.gz/refs/heads/series/2.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-dynamodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274822275,"owners_count":25356487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynamodb","scala","zio"],"created_at":"2024-11-10T22:16:02.200Z","updated_at":"2025-09-12T13:36:21.619Z","avatar_url":"https://github.com/zio.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command.)\n[//]: # (So please do not edit it manually. Instead, change \"docs/index.md\" file or sbt setting keys)\n[//]: # (e.g. \"readmeDocumentation\" and \"readmeSupport\".)\n\n# ZIO DynamoDB\n\nSimple, type-safe, and efficient access to DynamoDB\n\n[![Development](https://img.shields.io/badge/Project%20Stage-Development-green.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-dynamodb/workflows/CI/badge.svg) [![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-dynamodb_2.13.svg?label=Sonatype%20Release)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-dynamodb_2.13/) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-dynamodb_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-dynamodb_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-dynamodb-docs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-dynamodb-docs_2.13) [![ZIO DynamoDB](https://img.shields.io/github/stars/zio/zio-dynamodb?style=social)](https://github.com/zio/zio-dynamodb)\n\n## Introduction\n\nZIO DynamoDB is a library that is used for type-safe, efficient, and boilerplate free access to AWS's DynamoDB service. It provides a type-safe API for many query types and the number of type-safe APIs is expanding. ZIO DynamoDB will automatically batch queries and execute un-batchable queries in parallel.\n\nUnder the hood we use the excellent [ZIO AWS](https://zio.dev/zio-aws) library for type-safe DynamoDB access, and the awesome [ZIO Schema](https://zio.dev/zio-schema) library for schema derived codecs (see here for documentation on how to [customise these through annotations](docs/guides/codec-customization.md)).\n\nFor an overview of the High Level API please see the [ZIO DynamoDB cheat sheet](docs/guides/cheat-sheet.md).\n\n## Installation\n\nTo use ZIO DynamoDB, we need to add the following lines to our `build.sbt` file:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"dev.zio\" %% \"zio-dynamodb\" % \"1.0.0-RC22\"\n)\n```\n\n### Cats Effect Interop\n\nTo use the Cats Effect 3 interop module, we need to also add the following line to our `build.sbt` file:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"dev.zio\" %% \"zio-dynamodb-ce\" % \"1.0.0-RC22\"\n)\n```\n\nFor CE interop examples please see [examples sbt module](https://github.com/zio/zio-dynamodb/blob/series/2.x/examples/src/main/scala/zio/dynamodb/examples/dynamodblocal/interop/CeInteropExample.scala).\n\n### Future Interop\n\nFor projects that do not use effect libraries (e.g. Play applications) we can use the Future interop module.\nWe need to add the following line to our `build.sbt` file:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"dev.zio\" %% \"zio-dynamodb-future\" % \"1.0.0-RC22\"\n)\n```\n\nFor Future interop examples please see [examples sbt module](https://github.com/zio/zio-dynamodb/blob/series/2.x/examples/src/main/scala/zio/dynamodb/examples/dynamodblocal/interop/FutureInteropExample.scala).\n\n### Read/write DynamoDB JSON\nAWS tools like the CLI and Console read/write a special JSON representation of dynamoDB items. The new experimental optional `zio-dynamodb-json` module provides a way to read/write this form of JSON when working with both the High Level and Low Level API. To use this module, we need to also add the following line to our `build.sbt` file:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"dev.zio\" %% \"zio-dynamodb-json\" % \"1.0.0-RC22\"\n)\n```\n\n## Example\n\nFor examples please see [examples sbt module](https://github.com/zio/zio-dynamodb/tree/series/2.x/examples/src/main/scala/zio/dynamodb/examples). Below is `Main.scala` from that module:\n\n```scala\nimport zio.aws.core.config\nimport zio.aws.{ dynamodb, netty }\nimport zio.dynamodb.DynamoDBQuery.{ get, put }\nimport zio.dynamodb.{ DynamoDBExecutor }\nimport zio.schema.{ DeriveSchema, Schema }\nimport zio.ZIOAppDefault\nimport zio.dynamodb.ProjectionExpression\n\nobject Main extends ZIOAppDefault {\n\n  final case class Person(id: Int, firstName: String)\n  object Person {\n    implicit lazy val schema: Schema.CaseClass2[Int, String, Person] = DeriveSchema.gen[Person]\n\n    val (id, firstName) = ProjectionExpression.accessors[Person]\n  }\n  val examplePerson = Person(1, \"avi\")\n\n  private val program = for {\n    _      \u003c- put(\"personTable\", examplePerson).execute\n    person \u003c- get(\"personTable\")(Person.id.partitionKey === 1).execute\n    _      \u003c- zio.Console.printLine(s\"hello $person\")\n  } yield ()\n\n  override def run =\n    program.provide(\n      netty.NettyHttpClient.default,\n      config.AwsConfig.default, // uses real AWS dynamodb\n      dynamodb.DynamoDb.live,\n      DynamoDBExecutor.live\n    )\n}\n```\n\nFor examples on how to use the DynamoDBLocal in memory database please see the [integration tests](https://github.com/zio/zio-dynamodb/blob/series/2.x/dynamodb/src/it/scala/zio/dynamodb/TypeSafeApiCrudSpec.scala)\nand [DynamoDBLocalMain](https://github.com/zio/zio-dynamodb/blob/series/2.x/examples/src/main/scala/zio/dynamodb/examples/dynamodblocal/DynamoDBLocalMain.scala) .\nNote before you run these you must first run the DynamoDBLocal docker container using the provided docker-compose file:\n\n```\ndocker compose -f docker/docker-compose.yml up -d\n```\n\nDon't forget to shut down the container after you have finished\n\n```\ndocker compose -f docker/docker-compose.yml down\n```\n\n## Resources\n- [Introducing ZIO DynamoDB by Avinder Bahra \u0026 Adam Johnson](https://www.youtube.com/watch?v=f68-69eA8Vc\u0026t=33s) - DynamoDB powers many cloud-scale applications, with its robust horizontal scalability and uptime. Yet, interacting with the Java SDK is error-prone and tedious. In this presentation, Avinder Bahra presents ZIO DynamoDB, a new library by Avi and Adam Johnson designed to make interacting with DynamoDB easy, type-safe, testable, and productive.\n- [Introducing The ZIO DynamoDB Type-Safe API by Avinder Bahra](https://www.youtube.com/watch?v=Qte4WUfHQ3g\u0026t=10s) - Adam Johnson and Avinder released ZIO DynamoDB, a new Scala library that significantly reduces boilerplate when compared to working directly with AWS client libraries. However, there was still work to be done to improve type safety. In this talk, Avinder introduces a new type-safe API that can prevent many errors at compile time while remaining user-friendly.\n\n## Documentation\n\nLearn more on the [ZIO DynamoDB homepage](https://github.com/zio/zio-dynamodb)!\n\n## Contributing\n\nFor the general guidelines, see ZIO [contributor's guide](https://zio.dev/contributor-guidelines).\n\n## Code of Conduct\n\nSee the [Code of Conduct](https://zio.dev/code-of-conduct)\n\n## Support\n\nCome chat with us on [![Badge-Discord]][Link-Discord].\n\n[Badge-Discord]: https://img.shields.io/discord/629491597070827530?logo=discord \"chat on discord\"\n[Link-Discord]: https://discord.gg/2ccFBr4 \"Discord\"\n\n## License\n\n[License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-dynamodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzio%2Fzio-dynamodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-dynamodb/lists"}