To start the Ddb for namaste, at the command line enter:

java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -inMemory

Note that this command will run Ddb in memory only - when you exit the local db instance, no data will persist.

To run the Ddb instance saving data locally to a file, use this command:

java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -dbPath /some/file/path

The help file is incorrect - there is no default - if you leave the dbPath option blank, it will throw an error.

usage: java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar
            [-port <port-no.>] [-inMemory] [-delayTransientStatuses]
            [-dbPath <path>][-sharedDb] [-cors <allow-list>]
 -cors <arg>                Enable CORS support for javascript against a
                            specific allow-list list the domains separated
                            by , use '*' for public access (default is
                            '*')
 -dbPath <path>             Specify the location of your database file.
                            Default is the current directory.
 -delayTransientStatuses    When specified, DynamoDB Local will introduce
                            delays to hold various transient table and
                            index statuses so that it simulates actual
                            service more closely. Currently works only for
                            CREATING and DELETING online index statuses.
 -help                      Display DynamoDB Local usage and options.
 -inMemory                  When specified, DynamoDB Local will run in
                            memory.
 -optimizeDbBeforeStartup   Optimize the underlying backing store database
                            tables before starting up the server
 -port <port-no.>           Specify a port number. Default is 8000
 -sharedDb                  When specified, DynamoDB Local will use a
                            single database instead of separate databases
                            for each credential and region. As a result,
                            all clients will interact with the same set of
                            tables, regardless of their region and
                            credential configuration. (Useful for
                            interacting with Local through the JS Shell in
                            addition to other SDKs)

You will also need to configure you aws credentials which is easily done using the "aws configure" command:

$ aws configure
AWS Access Key ID [None]: YOUR-AWS-ACCESS-KEY
AWS Secret Access Key [None]: YOUR-AWS-SECRET-KEY
Default region name [None]: us-west-2
Default output format [None]:

Start the local instance of the DynamoDB:
$ java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -dbPath /YOUR/FILE/PATH

Test the connection by listing the existing tables in the database:
$ aws dynamodb list-tables --endpoint-url http://localhost:8000
{
    "TableNames": []
}


Note that the aws configure will create a directory in $HOME called ".aws/" and in that directory are two files:

$ more config
[default]
region = us-west-2

$ more credentials
[default]
aws_secret_access_key = gVADzw1ZEhl0ie1/ktMW+jz/pPKpdrd7Hr+6Tt0w
aws_access_key_id = AKIAIGBWL4HXBOOFXH5A

