aws AWS Developer Tools Blog ·

DynamoDB Mapper for Kotlin Now Generally Available on AWS

blogdataawsgapreviewengineeraws-dynamodb
announcement

AWS has announced the general availability of DynamoDB Mapper for Kotlin, providing an idiomatic way for Kotlin developers to interact with Amazon DynamoDB. This library simplifies reading, writing, and querying DynamoDB by mapping natural Kotlin data types to DynamoDB tables, abstracting away low-level API details. Since its Developer Preview in October 2024, new capabilities like updateItem, batch/transaction operations, atomic counters, and TTL management have been added, making it a production-ready solution.

  • Introducing DynamoDB Mapper for Kotlin
  • New Capabilities Since Developer Preview
  • Condition Expressions Extended
  • UpdateItem Operation and DSL
  • Batch and Transaction Operations
Enhancements (5)
  • New Capabilities Since Developer Preview

    The General Availability release includes significant additions since the Developer Preview, such as updateItem operations, batch and transaction capabilities, atomic counters, and TTL management, enhancing its production readiness.

  • Condition Expressions Extended

    Filter expressions, previously available for query and scan operations, are now extended to optional conditions in deleteItem, putItem, and updateItem operations, with support for per-action conditions in batch and transaction operations.

  • UpdateItem Operation and DSL

    The new updateItem operation allows for partial, in-place item updates without fetching and rewriting the entire object. An accompanying update DSL provides idiomatic Kotlin syntax for SET, REMOVE, ADD, and DELETE update actions.

  • Batch and Transaction Operations

    Developers can now operate on multiple items across tables in a single call using batchWriteItem and batchGetItem, and perform all-or-nothing operations across multiple tables with transactional reads and writes.

  • Atomic Counters for Numeric Fields

    Numeric fields can be annotated with @DynamoDbCounter, enabling automatic incrementing on putItem or updateItem calls, simplifying the management of counters.

Notes (1)
  • Introducing DynamoDB Mapper for Kotlin

    DynamoDB Mapper for Kotlin is now generally available, offering Kotlin developers a fully idiomatic approach to interact with Amazon DynamoDB. It maps Kotlin data types directly to DynamoDB tables, removing the need to manage low-level API details.

Read the original announcement →

https://aws.amazon.com/blogs/developer/announcing-general-availability-of-dynamodb-mapper-for-kotlin/

Related releases