

# Setting up DynamoDB
<a name="SettingUp"></a>

 In addition to the Amazon DynamoDB web service, AWS provides a downloadable version of DynamoDB that you can run on your computer. The downloadable version is helpful for developing and testing your code. It lets you write and test applications locally without accessing the DynamoDB web service. 

 The topics in this section describe how to set up DynamoDB (downloadable version) and the DynamoDB web service. 

**Topics**
+ [Setting up DynamoDB (web service)](SettingUp.DynamoWebService.md)
+ [Setting up DynamoDB local (downloadable version)](DynamoDBLocal.md)

# Setting up DynamoDB (web service)
<a name="SettingUp.DynamoWebService"></a>

 To use the Amazon DynamoDB web service: 

1.  [Sign up for AWS.](#SettingUp.DynamoWebService.SignUpForAWS) 

1.  [Get an AWS access key](#SettingUp.DynamoWebService.GetCredentials) (used to access DynamoDB programmatically). 
**Note**  
 If you plan to interact with DynamoDB only through the AWS Management Console, you don't need an AWS access key, and you can skip ahead to [Using the console](AccessingDynamoDB.md#ConsoleDynamoDB). 

1.  [Configure your credentials](#SettingUp.DynamoWebService.ConfigureCredentials) (used to access DynamoDB programmatically). 

## Signing up for AWS
<a name="SettingUp.DynamoWebService.SignUpForAWS"></a>

 To use the DynamoDB service, you must have an AWS account. If you don't already have an account, you are prompted to create one when you sign up. You're not charged for any AWS services that you sign up for unless you use them. 

**To sign up for AWS**

1. Open [https://portal.aws.amazon.com/billing/signup](https://portal.aws.amazon.com/billing/signup).

1. Follow the online instructions.

   Part of the sign-up procedure involves receiving a phone call or text message and entering a verification code on the phone keypad.

   When you sign up for an AWS account, an *AWS account root user* is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform [tasks that require root user access](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks).

## Granting programmatic access
<a name="SettingUp.DynamoWebService.GetCredentials"></a>

 Before you can access DynamoDB programmatically or through the AWS Command Line Interface (AWS CLI), you must have programmatic access. You don't need programmatic access if you plan to use the DynamoDB console only. 

Users need programmatic access if they want to interact with AWS outside of the AWS Management Console. The way to grant programmatic access depends on the type of user that's accessing AWS.

To grant users programmatic access, choose one of the following options.


****  

| Which user needs programmatic access? | To | By | 
| --- | --- | --- | 
| IAM | (Recommended) Use console credentials as temporary credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or AWS APIs. |  Following the instructions for the interface that you want to use. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SettingUp.DynamoWebService.html)  | 
|  Workforce identity (Users managed in IAM Identity Center)  | Use temporary credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or AWS APIs. |  Following the instructions for the interface that you want to use. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SettingUp.DynamoWebService.html)  | 
| IAM | Use temporary credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or AWS APIs. | Following the instructions in [Using temporary credentials with AWS resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) in the IAM User Guide. | 
| IAM | (Not recommended)Use long-term credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or AWS APIs. |  Following the instructions for the interface that you want to use. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SettingUp.DynamoWebService.html)  | 

## Configuring your credentials
<a name="SettingUp.DynamoWebService.ConfigureCredentials"></a>

 Before you can access DynamoDB programmatically or through the AWS CLI, you must configure your credentials to enable authorization for your applications. 

 There are several ways to do this. For example, you can manually create the credentials file to store your access key ID and secret access key. You also can use the AWS CLI command `aws configure` to automatically create the file. Alternatively, you can use environment variables. For more information about configuring your credentials, see the programming-specific AWS SDK developer guide.

 To install and configure the AWS CLI, see [Using the AWS CLI](AccessingDynamoDB.md#Tools.CLI). 

## Integrating with other DynamoDB services
<a name="w2aab9c17b9c13"></a>

You can integrate DynamoDB with many other AWS services. For more information, see the following: 
+ [Using DynamoDB with other AWS services](OtherServices.md)
+ [CloudFormation for DynamoDB](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html)
+ [Using AWS Backup with DynamoDB](backuprestore_HowItWorksAWS.md)
+ [AWS Identity and Access Management (IAM) and DynamoDB](identity-and-access-mgmt.md)
+ [Using AWS Lambda with Amazon DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html)

# Setting up DynamoDB local (downloadable version)
<a name="DynamoDBLocal"></a>

 With the downloadable version of Amazon DynamoDB, you can develop and test applications without accessing the DynamoDB web service. Instead, the database is self-contained on your computer. When you're ready to deploy your application in production, you remove the local endpoint in the code, and then it points to the DynamoDB web service. 

 Having this local version helps you save on throughput, data storage, and data transfer fees. In addition, you don't need an internet connection while you develop your application. 

 DynamoDB local is available as a [download](DynamoDBLocal.DownloadingAndRunning.md#DynamoDBLocal.DownloadingAndRunning.title) (requires JRE), as an [ Apache Maven dependency](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html#apache-maven), or as a [Docker image](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html#docker). 

 If you prefer to use the Amazon DynamoDB web service instead, see [Setting up DynamoDB (web service)](SettingUp.DynamoWebService.md). 

**Topics**
+ [Deploying DynamoDB locally on your computer](DynamoDBLocal.DownloadingAndRunning.md)
+ [DynamoDB local usage notes](DynamoDBLocal.UsageNotes.md)
+ [Release history for DynamoDB local](DynamoDBLocalHistory.md)
+ [Telemetry in DynamoDB local](DynamoDBLocalTelemetry.md)

# Deploying DynamoDB locally on your computer
<a name="DynamoDBLocal.DownloadingAndRunning"></a>

**Note**  
DynamoDB local is available in three versions: v3.x (Current), v2.x (Legacy), and v1.x (Deprecated).
DynamoDB v3.x is recommended for your local testing and development use.
Migration from DynamoDB local V2.x to V3.x requires updating import statements from `com.amazonaws.services.dynamodbv2` to `software.amazon.dynamodb` and updating Maven dependencies for Maven users.
If you're migrating an application that uses the SDK for Java v1.x to the SDK for Java 2.x, follow the steps for [AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration.html).

## Download DynamoDB local
<a name="DynamoDBLocal.DownloadingAndRunning.V2"></a>

Follow these steps to set up and run DynamoDB on your computer.

**To set up DynamoDB on your computer**

1. Download DynamoDB local for free from one of the following locations.  
****    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html)
**Important**  
 To run DynamoDB v2.6.0 or greater on your computer, you must have the Java Runtime Environment (JRE) version 17.x or newer. The application doesn't run on earlier JRE versions.

1.  After you download the archive, extract the contents and copy the extracted directory to a location of your choice. 

1.  To start DynamoDB on your computer, open a command prompt window, navigate to the directory where you extracted `DynamoDBLocal.jar`, and enter the following command. 

   ```
   java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
   ```
**Note**  
 If you're using Windows PowerShell, be sure to enclose the parameter name or the entire name and value like this:   
 ` java -D"java.library.path=./DynamoDBLocal_lib" -jar DynamoDBLocal.jar `   
 DynamoDB processes incoming requests until you stop it. To stop DynamoDB, press Ctrl\$1C at the command prompt.   
 DynamoDB uses port 8000 by default. If port 8000 is unavailable, this command throws an exception. For a complete list of DynamoDB runtime options, including `-port`, enter this command.   
 ` java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -help ` 

1. Before you can access DynamoDB programmatically or through the AWS Command Line Interface (AWS CLI), you must configure your credentials to enable authorization for your applications. Downloadable DynamoDB requires any credentials to work, as shown in the following example. 

   ```
   AWS Access Key ID: "fakeMyKeyId" 
   AWS Secret Access Key: "fakeSecretAccessKey"
   Default Region Name: "fakeRegion"
   ```

    You can use the `aws configure` command of the AWS CLI to set up credentials. For more information, see [Using the AWS CLI](AccessingDynamoDB.md#Tools.CLI). 

1.  Start writing applications. To access DynamoDB running locally with the AWS CLI, use the `--endpoint-url ` parameter. For example, use the following command to list DynamoDB tables. 

   ```
   aws dynamodb list-tables --endpoint-url http://localhost:8000
   ```

## Run DynamoDB local as Docker image
<a name="DynamoDBLocal.DownloadingAndRunning.Docker"></a>

 The downloadable version of Amazon DynamoDB is available as a Docker image. For more information, see [dynamodb-local](https://hub.docker.com/r/amazon/dynamodb-local). To see your current DynamoDB local version, enter the following command:

```
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -version
```

 For an example of using DynamoDB local as part of a REST application built on the AWS Serverless Application Model (AWS SAM), see [SAM DynamoDB application for managing orders](https://github.com/aws-samples/aws-sam-java-rest). This sample application demonstrates how to use DynamoDB local for testing. 

 If you want to run a multi-container application that also uses the DynamoDB local container, use Docker Compose to define and run all the services in your application, including DynamoDB local. 

**To install and run DynamoDB local with Docker compose:**

1.  Download and install [Docker desktop](https://www.docker.com/products/docker-desktop). 

1.  Copy the following code to a file and save it as `docker-compose.yml`. 

   ```
   services:
    dynamodb-local:
      command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
      image: "amazon/dynamodb-local:latest"
      container_name: dynamodb-local
      ports:
        - "8000:8000"
      volumes:
        - "./docker/dynamodb:/home/dynamodblocal/data"
      working_dir: /home/dynamodblocal
   ```

    If you want your application and DynamoDB local to be in separate containers, use the following yaml file. 

   ```
   version: '3.8'
   services:
    dynamodb-local:
      command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
      image: "amazon/dynamodb-local:latest"
      container_name: dynamodb-local
      ports:
        - "8000:8000"
      volumes:
        - "./docker/dynamodb:/home/dynamodblocal/data"
      working_dir: /home/dynamodblocal
    app-node:
      depends_on:
        - dynamodb-local
      image: amazon/aws-cli
      container_name: app-node
      ports:
       - "8080:8080"
      environment:
        AWS_ACCESS_KEY_ID: 'DUMMYIDEXAMPLE'
        AWS_SECRET_ACCESS_KEY: 'DUMMYEXAMPLEKEY'
      command:
        dynamodb describe-limits --endpoint-url http://dynamodb-local:8000 --region us-west-2
   ```

    This docker-compose.yml script creates an `app-node` container and a `dynamodb-local` container. The script runs a command in the `app-node` container that uses the AWS CLI to connect to the `dynamodb-local` container and describes the account and table limits. 

    To use with your own application image, replace the `image` value in the example below with that of your application. 

   ```
   version: '3.8'
   services:
    dynamodb-local:
      command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
      image: "amazon/dynamodb-local:latest"
      container_name: dynamodb-local
      ports:
        - "8000:8000"
      volumes:
        - "./docker/dynamodb:/home/dynamodblocal/data"
      working_dir: /home/dynamodblocal
    app-node:
      image: location-of-your-dynamodb-demo-app:latest
      container_name: app-node
      ports:
        - "8080:8080"
      depends_on:
        - "dynamodb-local"
      links:
        - "dynamodb-local"
      environment:
        AWS_ACCESS_KEY_ID: 'DUMMYIDEXAMPLE'
        AWS_SECRET_ACCESS_KEY: 'DUMMYEXAMPLEKEY'
        REGION: 'eu-west-1'
   ```
**Note**  
 The YAML scripts require that you specify an AWS access key and an AWS secret key, but they are not required to be valid AWS keys for you to access DynamoDB local. 

1.  Run the following command-line command: 

   ```
   docker-compose up
   ```

## Run DynamoDB local as an Apache Maven dependency
<a name="DynamoDBLocal.DownloadingAndRunning.Maven.v2"></a>

**Note**  
If you're migrating an application that uses the SDK for Java v1.x to the SDK for Java 2.x, follow the steps for [AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/migration.html).

 Follow these steps to use Amazon DynamoDB in your application as a dependency. 

**To deploy DynamoDB as an Apache Maven repository**

1.  Download and install Apache Maven. For more information, see [Downloading Apache Maven](https://maven.apache.org/download.cgi) and [Installing Apache Maven](https://maven.apache.org/install.html). 

1.  Add the DynamoDB Maven repository to your application's Project Object Model (POM) file. 

   ```
   <!--Dependency:-->
   <dependencies>
      <dependency>
         <groupId>software.amazon.dynamodb</groupId>
         <artifactId>DynamoDBLocal</artifactId>
         <version>3.3.0</version>
      </dependency>
   </dependencies>
   ```

    Example template for use with Spring Boot 3 and/or Spring Framework 6: 

   ```
   <?xml version="1.0" encoding="UTF-8"?>
   <project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   
   <groupId>org.example</groupId>
   <artifactId>SpringMavenDynamoDB</artifactId>
   <version>1.0-SNAPSHOT</version>
   
   <properties>
      <spring-boot.version>3.0.1</spring-boot.version>
      <maven.compiler.source>17</maven.compiler.source>
      <maven.compiler.target>17</maven.compiler.target>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>
   
      <parent>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-parent</artifactId>
          <version>3.1.0</version>
      </parent>
   
   <dependencies>
      <dependency>
          <groupId>software.amazon.dynamodb</groupId>
          <artifactId>DynamoDBLocal</artifactId>
          <version>3.3.0</version>
      </dependency>
      <!-- Spring Boot -->
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter</artifactId>
          <version>${spring-boot.version}</version>
      </dependency>
      <!-- Spring Web -->
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-web</artifactId>
          <version>${spring-boot.version}</version>
      </dependency>
      <!-- Spring Data JPA -->
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-data-jpa</artifactId>
          <version>${spring-boot.version}</version>
      </dependency>
      <!-- Other Spring dependencies -->
      <!-- Replace the version numbers with the desired version -->
      <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-context</artifactId>
          <version>6.0.0</version>
      </dependency>
      <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-core</artifactId>
          <version>6.0.0</version>
      </dependency>
      <!-- Add other Spring dependencies as needed -->
      <!-- Add any other dependencies your project requires -->
   </dependencies>
   </project>
   ```
**Note**  
 You can also use the [ Maven central repository](https://mvnrepository.com/artifact/com.amazonaws/DynamoDBLocal?repo=dynamodb-local-release) URL. 

## Run DynamoDB local in AWS CloudShell
<a name="DynamoDBLocal.DynamoDB.Local.CloudShell"></a>

AWS CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the AWS Management Console. You can navigate to AWS CloudShell from the AWS Management Console a few different ways. For more information, see [Getting started with AWS CloudShell](https://docs.aws.amazon.com/cloudshell/latest/userguide/getting-started.html).

Follow these steps to run DynamoDB local in your AWS CloudShell anywhere in the AWS Management Console. 

**To run DynamoDB local in your AWS CloudShell in the AWS Management Console**

1. Launch AWS CloudShell from the console interface, choose an available AWS Region, and switch to your preferred shell, such as Bash, PowerShell, or Z shell.

1. To choose an AWS Region, go to the **Select a Region** menu and select a [supported AWS Region](https://docs.aws.amazon.com/cloudshell/latest/userguide/supported-aws-regions.html). (Available Regions are highlighted.)

1. From the AWS Management Console, launch AWS CloudShell by choosing one of the following options:

   1. On the navigation bar, choose the **AWS CloudShell** icon.

   1. In the **Search** box, enter the word CloudShell, and then choose **CloudShell**.

   1. In the **Recently visited** widget, choose **CloudShell**.

   1. From the console toolbar, choose **CloudShell**.

1. To run DynamoDB local in AWS CloudShell you can use the `dynamodb-local` alias. You can specify additional command line options for changing DynamoDB local settings. See [DynamoDB local usage notes](DynamoDBLocal.UsageNotes.md) for available options.
**Note**  
To run DynamoDB local in the background, run DynamoDB local in AWS CloudShell using: `dynamodb-local &`.

1. To access DynamoDB running locally in AWS CloudShell with the AWS CLI, use the `--endpoint-url` parameter. For example, use the following command to list DynamoDB tables:

   `aws dynamodb list-tables --endpoint-url http://localhost:8000`

For an example of a sample project that showcases multiple approaches to set up and use DynamoDB local, including downloading JAR files, running it as a Docker image, and using it as a Maven dependency, see [DynamoDB Local Sample Java Project](https://github.com/awslabs/amazon-dynamodb-local-samples/tree/main).

# DynamoDB local usage notes
<a name="DynamoDBLocal.UsageNotes"></a>

 Except for the endpoint, applications that run with the downloadable version of Amazon DynamoDB should also work with the DynamoDB web service. However, when using DynamoDB locally, you should be aware of the following: 
+  If you use the `-sharedDb` option, DynamoDB creates a single database file named *shared-local-instance.db*. Every program that connects to DynamoDB accesses this file. If you delete the file, you lose any data that you have stored in it. 
+  If you omit `-sharedDb`, the database file is named *myaccesskeyid\$1region.db*, with the AWS access key ID and AWS Region as they appear in your application configuration. If you delete the file, you lose any data that you have stored in it. 
+  If you use the `-inMemory` option, DynamoDB doesn't write any database files at all. Instead, all data is written to memory, and the data is not saved when you terminate DynamoDB. 
+  If you use the `-inMemory` option, the `-sharedDb` option is also required. 
+  If you use the `-optimizeDbBeforeStartup` option, you must also specify the `-dbPath` parameter so that DynamoDB can find its database file. 
+  The AWS SDKs for DynamoDB require that your application configuration specify an access key value and an AWS Region value. Unless you're using the `-sharedDb` or the `-inMemory` option, DynamoDB uses these values to name the local database file. These values don't have to be valid AWS values to run locally. However, you might find it convenient to use valid values so that you can run your code in the cloud later by changing the endpoint you're using. 
+  DynamoDB local always returns null for `billingModeSummary.` 
+  DynamoDB local `AWS_ACCESS_KEY_ID` can contain only letters (A–Z, a–z) and numbers (0–9). 
+ DynamoDB local doesn't support [Point-in-time recovery (PITR)](Point-in-time-recovery.md).

**Topics**
+ [Command line options](#DynamoDBLocal.CommandLineOptions)
+ [Setting the local endpoint](#DynamoDBLocal.Endpoint)
+ [Differences between downloadable DynamoDB and the DynamoDB web service](#DynamoDBLocal.Differences)

## Command line options
<a name="DynamoDBLocal.CommandLineOptions"></a>

 You can use the following command line options with the downloadable version of DynamoDB: 
+  `-cors` `value` — Enables support for cross-origin resource sharing (CORS) for JavaScript. You must provide a comma-separated "allow" list of specific domains. The default setting for `-cors` is an asterisk (\$1), which allows public access. 
+  `-dbPath` `value` — The directory where DynamoDB writes its database file. If you don't specify this option, the file is written to the current directory. You can't specify both `-dbPath` and `-inMemory` at once. 
+  `-delayTransientStatuses` — Causes DynamoDB to introduce delays for certain operations. DynamoDB (downloadable version) can perform some tasks almost instantaneously, such as create/update/delete operations on tables and indexes. However, the DynamoDB service requires more time for these tasks. Setting this parameter helps DynamoDB running on your computer simulate the behavior of the DynamoDB web service more closely. (Currently, this parameter introduces delays only for global secondary indexes that are in either *CREATING* or *DELETING* status.) 
+  `-help` — Prints a usage summary and options. 
+  `-inMemory` — DynamoDB runs in memory instead of using a database file. When you stop DynamoDB, none of the data is saved. You can't specify both `-dbPath` and `-inMemory` at once. 
+  `-optimizeDbBeforeStartup` — Optimizes the underlying database tables before starting DynamoDB on your computer. You also must specify `-dbPath` when you use this parameter. 
+  `-port` `value` — The port number that DynamoDB uses to communicate with your application. If you don't specify this option, the default port is `8000`. 
**Note**  
 DynamoDB uses port 8000 by default. If port 8000 is unavailable, this command throws an exception. You can use the `-port` option to specify a different port number. For a complete list of DynamoDB runtime options, including `-port` , type this command:   
 `java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -help` 
+  `-sharedDb` — If you specify `-sharedDb`, DynamoDB uses a single database file instead of separate files for each credential and Region. 
+  `-disableTelemetry` — When specified, DynamoDB local will not send any telemetry. 
+ `-version` — Prints the version of DynamoDB local.

## Setting the local endpoint
<a name="DynamoDBLocal.Endpoint"></a>

 By default, the AWS SDKs and tools use endpoints for the Amazon DynamoDB web service. To use the SDKs and tools with the downloadable version of DynamoDB, you must specify the local endpoint: 

 `http://localhost:8000` 

### AWS Command Line Interface
<a name="DynamoDBLocal.Endpoint.CLI"></a>

 You can use the AWS Command Line Interface (AWS CLI) to interact with downloadable DynamoDB. 

 To access DynamoDB running locally, use the `--endpoint-url` parameter. The following is an example of using the AWS CLI to list the tables in DynamoDB on your computer. 

```
aws dynamodb list-tables --endpoint-url http://localhost:8000
```

**Note**  
 The AWS CLI can't use the downloadable version of DynamoDB as a default endpoint. Therefore, you must specify `--endpoint-url` with each AWS CLI command. 

### AWS SDKs
<a name="DynamoDBLocal.Endpoint.SDK"></a>

 The way you specify an endpoint depends on the programming language and AWS SDK you're using. The following sections describe how to do this: 
+  [Java: Setting the AWS Region and endpoint](CodeSamples.Java.md#CodeSamples.Java.RegionAndEndpoint) (DynamoDB local supports the AWS SDK for Java V1 and V2) 
+ CodeSamples.Java.RegionAndEndpoint [.NET: Setting the AWS Region and endpoint](CodeSamples.DotNet.md#CodeSamples.DotNet.RegionAndEndpoint) 

## Differences between downloadable DynamoDB and the DynamoDB web service
<a name="DynamoDBLocal.Differences"></a>

 The downloadable version of DynamoDB is intended for development and testing purposes only. By comparison, the DynamoDB web service is a managed service with scalability, availability, and durability features that make it ideal for production use. 

 The downloadable version of DynamoDB differs from the web service in the following ways: 
+ AWS Regions and distinct AWS accounts are not supported at the client level. 
+  Provisioned throughput settings are ignored in downloadable DynamoDB, even though the `CreateTable` operation requires them. For `CreateTable`, you can specify any numbers you want for provisioned read and write throughput, even though these numbers are not used. You can call `UpdateTable` as many times as you want per day. However, any changes to provisioned throughput values are ignored. 
+  `Scan` operations are performed sequentially. Parallel scans are not supported. The `Segment` and `TotalSegments` parameters of the `Scan` operation are ignored. 
+  The speed of read and write operations on table data is limited only by the speed of your computer. `CreateTable`, `UpdateTable`, and `DeleteTable` operations occur immediately, and table state is always ACTIVE. `UpdateTable` operations that change only the provisioned throughput settings on tables or global secondary indexes occur immediately. If an `UpdateTable` operation creates or deletes any global secondary indexes, then those indexes transition through normal states (such as CREATING and DELETING, respectively) before they become an ACTIVE state. The table remains ACTIVE during this time. 
+  Read operations are eventually consistent. However, due to the speed of DynamoDB local running on your computer, most reads appear to be strongly consistent. 
+  Item collection metrics and item collection sizes are not tracked. In operation responses, nulls are returned instead of item collection metrics. 
+  In DynamoDB, there is a 1 MB limit on data returned per result set. Both the DynamoDB web service and the downloadable version enforce this limit. However, when querying an index, the DynamoDB service calculates only the size of the projected key and attributes. By contrast, the downloadable version of DynamoDB calculates the size of the entire item. 
+  If you're using DynamoDB Streams, the rate at which shards are created might differ. In the DynamoDB web service, shard-creation behavior is partially influenced by table partition activity. When you run DynamoDB locally, there is no table partitioning. In either case, shards are ephemeral, so your application should not be dependent on shard behavior. 
+  `TransactionConflictExceptions` aren't thrown by downloadable DynamoDB for transactional APIs. We recommend that you use a Java mocking framework to simulate `TransactionConflictExceptions` in the DynamoDB handler to test how your application responds to conflicting transactions. 
+  In the DynamoDB web service, whether being accessed via the console or the AWS CLI, table names are case sensitive. A table named `Authors` and one named `authors` can both exist as separate tables. In the downloadable version, table names are case insensitive, and attempting to create these two tables would result in an error. 
+ Tagging is not supported in the downloadable version of DynamoDB.
+ The downloadable version of DynamoDB ignores the [Limit](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ExecuteStatement.html#DDB-ExecuteStatement-request-Limit) parameter in [ExecuteStatement](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ExecuteStatement.html).

# Release history for DynamoDB local
<a name="DynamoDBLocalHistory"></a>

The following table describes the important changes in each release of *DynamoDB local*.


****  

| Version | Change | Description | Date | 
| --- | --- | --- | --- | 
| 3.3.0 |  Adding multi-attribute key support for Global Secondary Indexes  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  January 19, 2026  | 
| 3.2.0 |  Fixed Compatibility Issues with multiple Kotlin Versions  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  January 09, 2026  | 
| 3.1.0 |  Improving performance for PartiQL Queries, Including Joda-time dependency  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  September 14, 2025  | 
| 3.0.0 |  Migrating from AWS SDK Java V1 to V2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  July 17, 2025  | 
| 2.6.0 |  Support table ARN as table name in DynamoDB APIs Performance fix and security updates  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  March 13, 2025  | 
| 2.5.4 |  Upgrading to Jetty Dependencies  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  December 12, 2024  | 
| 2.5.3 |  Upgrading Jackson Dependencies to 2.17.x in Log4j Core (Resolves CVE-2022-1471)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  November 6, 2024  | 
| 2.5.2 | Bug fix for Update table workflow | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  | June 20, 2024 | 
| 2.5.1 | Patch for bugs introduced in OndemandThroughPut feature  | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html) | June 5, 2024 | 
| 2.5.0 |  Support for configurable maximum throughput for on-demand tables, `ReturnValuesOnConditionCheckFailure`, `BatchExecuteStatement`, and `ExecuteTransactionRequest`  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  May 28, 2024  | 
| 2.4.0 |  Support for `ReturnValuesOnConditionCheckFailure` - Embedded Mode  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  April 17, 2024  | 
| 2.3.0 |  Jetty and JDK Upgrade  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  March 14, 2024  | 
| 2.2.0 |  Added support for table deletion protection and the `ReturnValuesOnConditionCheckFailure` parameter  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  December 14, 2023  | 
| 2.1.0 |  Support for SQLLite Native Libraries for Maven projects and adding telemetry  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  October 23, 2023  | 
| 2.0.0 |  Migrating from javax to jakarta namespace and JDK11 Support  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  July 5, 2023  | 
| 1.25.1 |  Upgrading Jackson Dependencies to 2.17.x in Log4j Core (Resolves CVE-2022-1471)  |  Upgrading Jackson Dependencies to 2.17.x in Log4j Core (Resolves CVE-2022-1471) to address a critical security vulnerability in the SnakeYAML library, which is a transitive dependency  |  November 6, 2024  | 
| 1.25.0 |  Added support for table deletion protection and the `ReturnValuesOnConditionCheckFailure` parameter  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  December 18, 2023  | 
| 1.24.0 |  Support for SQLLite Native Libraries for Maven projects and adding telemetry  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  October 23, 2023  | 
| 1.23.0 |  Handle invalid access and secret key while server startup  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  June 28, 2023  | 
| 1.22.0 |  Support of Limit Operation for PartiQL  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  June 8, 2023  | 
| 1.21.0 |  Support for 100 actions per transaction  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  January 26, 2023  | 
| 1.20.0 |  Added support for M1 Mac  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  |  September 12, 2022  | 
| 1.19.0 |  Upgraded the PartiQL Parser  |  Upgraded the PartiQL Parser and other related libraries  |  July 27, 2022  | 
| 1.18.0 | Upgraded log4j-core and Jackson-core | Upgraded log4j-core to 2.17.1 and Jackson-core 2.10.x to 2.12.0 | January 10, 2022 | 
| 1.17.2 | Upgraded log4j-core | Upgraded log4j-core dependency to version 2.16 | January 16, 2021 | 
| 1.17.1 | Upgraded log4j-core | Updated log4j-core dependency to patch zero-day exploit to prevent remote code execution - Log4Shel | January 10, 2021 | 
| 1.17.0 | Deprecated Javascript Web Shell |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html)  | January 8, 2021 | 

# Telemetry in DynamoDB local
<a name="DynamoDBLocalTelemetry"></a>

 At AWS, we develop and launch services based on what we learn from interactions with customers, and we use customer feedback to iterate on our products. Telemetry is additional information that helps us to better understand our customers needs, diagnose issues, and deliver features that improve the customer experience. 

 DynamoDB local collects telemetry, such as generic usage metrics, systems and environment information, and errors. For details about the types of telemetry collected, see [Types of information collected](#DynamoDBLocalTelemetry.TypesOfInformationCollected). 

 DynamoDB local does not collect personal information, such as user names or email addresses. It also does not extract sensitive project-level information. 

 As a customer, you control whether telemetry is turned on, and you can change your settings at any point in time. If telemetry remains on, DynamoDB local sends telemetry data in the background without requiring any additional customer interaction. 

## Turn off telemetry using command line options
<a name="DynamoDBLocalTelemetry.cli"></a>

 You can turn off telemetry using command line options when starting DynamoDB local using the option `-disableTelemetry`. For more information, see [Command line options](DynamoDBLocal.UsageNotes.md#DynamoDBLocal.CommandLineOptions).

## Turn off telemetry for a single session
<a name="DynamoDBLocalTelemetry.TurnOffTelemetrySingleSession"></a>

 In macOS and Linux operating systems, you can turn off telemetry for a single session. To turn off telemetry for your current session, run the following command to set the environment variable `DDB_LOCAL_TELEMETRY` to `false`. Repeat the command for each new terminal or session. 

```
export DDB_LOCAL_TELEMETRY=0
```

## Turn off telemetry for your profile in all sessions
<a name="DynamoDBLocalTelemetry.TurnOffTelemetryForAllSessions"></a>

 Run the following commands to turn off telemetry for all sessions when you're running DynamoDB local on your operating system. 

**To turn off telemetry in Linux**

1.  Run: 

   ```
   echo "export DDB_LOCAL_TELEMETRY=0" >>~/.profile
   ```

1.  Run: 

   ```
   source ~/.profile
   ```

**To turn off telemetry in macOS**

1.  Run: 

   ```
   echo "export DDB_LOCAL_TELEMETRY=0" >>~/.profile
   ```

1.  Run: 

   ```
   source ~/.profile
   ```

**To turn off telemetry in Windows**

1.  Run: 

   ```
   setx DDB_LOCAL_TELEMETRY 0
   ```

1.  Run: 

   ```
   refreshenv
   ```

## Turn off telemetry using DynamoDB local embedded on Maven projects
<a name="DynamoDBLocalTelemetry.maven"></a>

 You can turn off telemetry using DynamoDB local embedded on Maven projects. 

```
boolean disableTelemetry = true;
// AWS SDK v1
 AmazonDynamoDB amazonDynamoDB = DynamoDBEmbedded.create(disableTelemetry).amazonDynamoDB();

// AWS SDK v2
DynamoDbClient ddbClientSDKv2Local = DynamoDBEmbedded.create(disableTelemetry).dynamoDbClient();
```

## Types of information collected
<a name="DynamoDBLocalTelemetry.TypesOfInformationCollected"></a>
+  **Usage information** — The generic telemetry like server start/stop and the API or Operation called. 
+  **System and environment information** — The Java version, operating system (Windows, Linux or macOS), the environment in which DynamoDB local runs (for example, Stand alone JAR, Docker container, or as a Maven Dependency), and hash values of usage attributes. 

## Learn more
<a name="DynamoDBLocalTelemetry.LearnMore"></a>

 The telemetry data that DynamoDB local collects adheres to the AWS data privacy policies. For more information, see the following: 
+  [AWS service terms](https://aws.amazon.com/service-terms/) 
+  [Data privacy FAQ](https://aws.amazon.com/compliance/data-privacy-faq/) 