You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-19Lines changed: 30 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,9 @@ All CLI options are optional:
51
51
--sharedDb -h DynamoDB will use a single database file, instead of using separate files for each credential and region. If you specify -sharedDb, all DynamoDB clients will interact with the same set of tables regardless of their region and credential configuration.
52
52
--delayTransientStatuses -t Causes DynamoDB to introduce delays for certain operations. DynamoDB can perform some tasks almost instantaneously, such as create/update/delete operations on tables and indexes; however, the actual DynamoDB service requires more time for these tasks. Setting this parameter helps DynamoDB simulate the behavior of the Amazon DynamoDB web service more closely. (Currently, this parameter introduces delays only for global secondary indexes that are in either CREATING or DELETING status.)
53
53
--optimizeDbBeforeStartup -o Optimizes the underlying database tables before starting up DynamoDB on your computer. You must also specify -dbPath when you use this parameter.
54
+
--migration -m After starting dynamodb local, run dynamodb migrations.
55
+
--heapInitial The initial heap size
56
+
--heapMax The maximum heap size
54
57
--migrate -m After starting DynamoDB local, create DynamoDB tables from the Serverless configuration.
55
58
--seed -s After starting and migrating dynamodb local, injects seed data into your tables. The --seed option determines which data categories to onload.
56
59
--convertEmptyValues -e Set to true if you would like the document client to convert empty values (0-length strings, binary buffers, and sets) to be converted to NULL types when persisting to DynamoDB.
@@ -67,6 +70,8 @@ custom:
67
70
start:
68
71
port: 8000
69
72
inMemory: true
73
+
heapInitial: 200m
74
+
heapMax: 1g
70
75
migrate: true
71
76
seed: true
72
77
convertEmptyValues: true
@@ -115,23 +120,24 @@ If `dynamodb.start.seed` is true, then seeding is performed after table migratio
115
120
If you wish to use raw AWS AttributeValues to specify your seed data instead of Javascript types then simply change the variable of any such json files from `sources:` to `rawsources:`.
116
121
117
122
```yml
118
-
dynamodb:
119
-
start:
120
-
seed: true
121
-
122
-
seed:
123
-
domain:
124
-
sources:
125
-
- table: domain-widgets
126
-
sources: [./domainWidgets.json]
127
-
- table: domain-fidgets
128
-
sources: [./domainFidgets.json]
129
-
test:
130
-
sources:
131
-
- table: users
132
-
rawsources: [./fake-test-users.json]
133
-
- table: subscriptions
134
-
sources: [./fake-test-subscriptions.json]
123
+
custom:
124
+
dynamodb:
125
+
start:
126
+
seed: true
127
+
128
+
seed:
129
+
domain:
130
+
sources:
131
+
- table: domain-widgets
132
+
sources: [./domainWidgets.json]
133
+
- table: domain-fidgets
134
+
sources: [./domainFidgets.json]
135
+
test:
136
+
sources:
137
+
- table: users
138
+
rawsources: [./fake-test-users.json]
139
+
- table: subscriptions
140
+
sources: [./fake-test-subscriptions.json]
135
141
```
136
142
137
143
```bash
@@ -160,14 +166,19 @@ var AWS = require('aws-sdk');
160
166
```
161
167
new AWS.DynamoDB.DocumentClient({
162
168
region: 'localhost',
163
-
endpoint: 'http://localhost:8000'
169
+
endpoint: 'http://localhost:8000',
170
+
accessKeyId: 'DEFAULT_ACCESS_KEY', // needed if you don't have aws credentials at all in env
171
+
secretAccessKey: 'DEFAULT_SECRET' // needed if you don't have aws credentials at all in env
164
172
})
165
173
```
166
174
e.g. for dynamodb document client sdk
167
175
```
168
176
new AWS.DynamoDB({
169
177
region: 'localhost',
170
-
endpoint: 'http://localhost:8000'
178
+
endpoint: 'http://localhost:8000',
179
+
accessKeyId: 'DEFAULT_ACCESS_KEY', // needed if you don't have aws credentials at all in env
180
+
secretAccessKey: 'DEFAULT_SECRET' // needed if you don't have aws credentials at all in env
Copy file name to clipboardExpand all lines: index.js
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,16 @@ class ServerlessDynamodbLocal {
75
75
shortcut: "s",
76
76
usage: "After starting and migrating dynamodb local, injects seed data into your tables. The --seed option determines which data categories to onload.",
77
77
},
78
+
migration: {
79
+
shortcut: 'm',
80
+
usage: 'After starting dynamodb local, run dynamodb migrations'
81
+
},
82
+
heapInitial: {
83
+
usage: 'The initial heap size. Specify megabytes, gigabytes or terabytes using m, b, t. E.g., "2m"'
84
+
},
85
+
heapMax: {
86
+
usage: 'The maximum heap size. Specify megabytes, gigabytes or terabytes using m, b, t. E.g., "2m"'
87
+
},
78
88
convertEmptyValues: {
79
89
shortcut: "e",
80
90
usage: "Set to true if you would like the document client to convert empty values (0-length strings, binary buffers, and sets) to be converted to NULL types when persisting to DynamoDB.",
@@ -332,6 +342,20 @@ class ServerlessDynamodbLocal {
0 commit comments