> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DynamoDB

> Power internal tools, in-app experiences, and more

## Overview

This destination combines the analytical power of your data warehouse to power your high-performance applications at any scale.

## Supported syncing

| Sync Type | Description | Supported Sync Modes |
| - | - | - |
| **Items** | Sync rows from any source as [items](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html) into DynamoDB | Upsert |

## Connect to DynamoDB

To connect to your DynamoDB instance, you need to provide Hightouch access to your AWS account. You can do this via access key or cross-account role.
For either method, you must give permission for the following actions:

```
    "dynamodb:BatchGetItem",
    "dynamodb:BatchWriteItem",
    "dynamodb:PutItem",
    "dynamodb:DescribeTable",
    "dynamodb:DeleteItem",
    "dynamodb:UpdateItem",
```

### Authenticating with a cross-account role

Hightouch recommends using a cross-account role for cleaner access. See our [AWS security page](https://docs.hightouch.com/security/aws.md#cross-account-role) to learn more about how to use the cross-account role.

> [!NOTE]
>
> The cross-account role must also allow `dynamodb:ListTables` on `Resource: "*"`. Hightouch uses this permission to discover available tables during destination setup and connection testing. Without it, destination configuration in the UI fails with an access denied error.

### Authenticating with an access key

You can give Hightouch access to your AWS account with an access key. Copy your Access key ID and Secret access key into Hightouch. See the [AWS docs](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html) for best practices.

## Syncing data

Once you've authenticated DynamoDB in Hightouch, you need to set up your sync configuration.

### Table selection

In the sync configuration page, select a DynamoDB table to sync to. If your table doesn't exist yet, create it in AWS.

### Record matching

match rows in your model with records in DynamoDB via DynamoDB's primary key. See AWS's guide on [how to choose a primary key](https://aws.amazon.com/blogs/database/choosing-the-right-dynamodb-partition-key/) to learn more.

### Field mapping

Hightouch infers field types from the fields values of rows.

> [!NOTE]
>
> Hightouch sends the `timestamp` field to DynamoDB as an ISO string. If you
> want to format it differently, format the value in your model and set the type
> to `String`.

#### Delete behavior

When rows are deleted from your source, you can `do nothing`, `clear`, or `delete` them in DynamoDB.

| Type | Description |
| - | - |
| **Do nothing** | Keep the synced record in your DynamoDB |
| **Clear** | Remove the synced fields of the synced record from your DynamoDB |
| **Delete** | Delete the synced record from your DynamoDB |

> [!WARNING]
>
> Deletions are destructive and irreversible. Be sure this is the behavior you
> want when selecting `clear` or `delete`.

### Testing a sync

Before running your sync, Hightouch recommends that you test your sync configuration by syncing a single row. You can verify that a row was successfully synced by going to your DynamoDB instance table and finding the synced row by its primary key.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).

### Rate limits

DynamoDB has quotas that may limit your syncs. If that happens, Hightouch [retries failed rows](https://docs.hightouch.com/syncs/retries.md). For more information, refer to DynamoDB's [throughput quotas](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ServiceQuotas.html#default-limits-throughput-capacity-modes).

### Empty field mappings

DynamoDB is a key/value NoSQL database. That means the database doesn't store metadata on its columns and column names and you won't see any suggested fields during field mapping in Hightouch.

### Setting up sync alerts

Hightouch can alert you of sync issues via Slack, PagerDuty, SMS, or email. For details, please visit our [article on alerting](https://docs.hightouch.com/syncs/alerting.md).
