Liquibase Amazon DynamoDB Pro Extension Overview

Amazon DynamoDB is a fully managed, flexible-schema NoSQL database service. You can use Amazon DynamoDB to create a database table that can store and retrieve any amount of data, and serve any level of request traffic. Amazon DynamoDB automatically spreads the data and traffic for the table over a sufficient number of servers to handle the request capacity specified by the customer and the amount of data stored. For more information, see the Amazon DynamoDB Documentation.

You can deploy Amazon DynamoDB changes in XML, YAML, and JSON changelogs using the Amazon DynamoDB Extension for Liquibase Pro. However, because Amazon DynamoDB does not use SQL, you cannot use SQL changelogs or Liquibase commands that generate SQL output. Instead, you can specify some statements in PartiQL (a SQL-compatible query language) using the partiql and partiqlFile Change Types. You can also use Liquibase DynamoDB Change Types to create, update, and delete tables and indexes. For a list of supported features, see the Features section.

Getting started tutorial

To learn how to install, configure, and use the Liquibase Amazon DynamoDB extension with your instance of Amazon DynamoDB, see Using Liquibase with Amazon DynamoDB Pro. This page contains driver download links, AWS permissions guidance, and a sample changelog to use for a test deployment.

Verified database versions

Liquibase Amazon DynamoDB extension version Liquibase Pro version required Amazon DynamoDB versions verified
1.1.0 4.28.0+
  • Cloud

1.0.0

4.26.0+
  • Cloud

For release notes, see Amazon DynamoDB Extension Release Notes.

Features

The Liquibase Amazon DynamoDB extension supports many Liquibase Open Source and Liquibase Pro features, including:

Amazon DynamoDB billing modes

Amazon DynamoDB has two pricing models for the number of read and write operations you perform on tables in your database every second:

  • On-demand (PAY_PER_REQUEST): only pay for requests you actually make
  • Provisioned (PROVISIONED): you pay for a specific maximum number of requests per second

For more information, see Read/write capacity mode.

Liquibase connects to the DynamoDB API to let you configure the billing mode of each table in your database. You can configure the billing mode for the Liquibase Tracking Tables separately.

Amazon DynamoDB waiters

When you deploy a change, Liquibase submits a request and then DynamoDB processes it. Internally, DynamoDB uses waiters to ensure that objects are in the correct state before other code can modify them.

Asynchronous DynamoDB operations can take a long time, such as increases to a table's provisioned capacity. Synchronous operations are typically faster, such as simple updates to data in a table. Liquibase does not control the sequence or timing of DynamoDB operations.

Liquibase runs changesets sequentially. You can use Liquibase waiter parameters to specify how long Liquibase should wait for DynamoDB to respond while deploying a change. If Liquibase times out, it moves onto the next changeset, even though DynamoDB may not have finished.

It may be necessary to set higher wait times to give DynamoDB flexibility while making complex changes; or lower wait times to ensure that a single time-consuming changeset does not delay your whole CI/CD process. However, if Liquibase skips a changeset that other changesets depend on, the dependent changesets may fail. You can disable waiters entirely, but this can also lead to failures.

For a list of Liquibase DynamoDB waiter parameters, see: Supported parameters.

Note: Liquibase does not use Amazon DynamoDB waiters when you create, update, or delete indexes.

Amazon DynamoDB objects

DynamoDB has a different structure than relational SQL databases. Liquibase connects to the DynamoDB API to run operations on your database. The following are objects your DynamoDB database contains:

  • Tables: a group of items. Normalization is not enforced.
    • Items: similar to a record (row) in a relational database, but every item can have its own unique attributes.
    • Attributes: similar to a field (column) in a relational database, formatted as key-value pairs.
  • Primary keys: DynamoDB assigns a unique primary key to every item in every table in your database, but is otherwise schemaless.
    • Partition keys: a non-composite primary key that lets you query items in your tables.
    • Sort keys: differentiates items that share a partition key. When combined with a partition key, a sort key is a composite primary key.
  • Secondary indexes: lets you query the data in the table using an alternate key, in addition to queries against the primary key.
    • Global secondary indexes: indexes with a partition key and sort key that can be different from those on the table.
    • Local secondary indexes: indexes with the same partition key as the table, but a different sort key.
  • Streams: near-real time records that capture data modifications in DynamoDB

For more information, see Core components of Amazon DynamoDB.

Supported Change Types

Change Types in the Liquibase DynamoDB extension mirror actions in the DynamoDB API and have similar attributes. Normal Liquibase Change Types are not supported in Amazon DynamoDB. You must use the following Change Types in your changelog:

For more information, see Liquibase Change Types for Amazon DynamoDB Pro.

Supported parameters

You can use all normal Liquibase Parameters with Amazon DynamoDB.

To configure DynamoDB-specific behavior, such as the billing mode for the Liquibase Tracking Tables and the behavior of the DynamoDB waiter, you can set these Liquibase parameters in the CLI, in flow files, in your liquibase.properties file, or as environment variables:

For more information, see Liquibase Parameters for Amazon DynamoDB Pro.

Supported commands

Liquibase supports the following commands for Amazon DynamoDB:

For more information, see Liquibase Commands.

Supported policy checks

Liquibase supports the following policy checks for Amazon DynamoDB:

Checks for the changelog:

For more information, see Changelog Policy Checks.

Limitations

Related links