Skip to content

Commit 865b3c5

Browse files
committed
Updating the readme with AWS Profile for Migrations
1 parent 6c99c1d commit 865b3c5

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ All the above options can be added to s-project.json to set default configuratio
7676
}
7777
```
7878

79-
## Migrations: sls dynamodb create/execute/executeAll
79+
## Migrations: sls dynamodb <migration-command>
80+
Migration-Commands create, execute, executeAll
8081
### Configurations
8182
In `s-project.json` add following to customize DynamoDB Migrations file directory and table prefixes/suffixes
8283
```json
@@ -101,6 +102,18 @@ In `s-project.json` add following to execute all the migration upon DynamoDB Loc
101102
}
102103
}
103104
```
105+
106+
For Migration-Commands execute/executeAll following optional parameters can be used
107+
108+
```
109+
--region -r Region that dynamodb should be remotely executed.
110+
--stage -s Stage that dynamodb should be remotely executed.
111+
--table_prefix -t Dynamodb Table name prefixs (E.g. for prefix = production- and abstract table-name = users, after adding the prefix it will be production-users)
112+
--table_suffix -x Table name suffix (E.g for suffix = -test and abstract table-name = users, after adding the suffix it will be users-test )
113+
--profile -p Use another AWS Profile to execute migration
114+
--name -n Execute a migration template with the given name (This is only for execute command and not applicable for executeAll).
115+
```
116+
104117
### Migration Template
105118
```json
106119
{
@@ -162,6 +175,7 @@ In `s-project.json` add following to execute all the migration upon DynamoDB Loc
162175
"attr_2": "attr_2_value"
163176
}]
164177
}
178+
165179
```
166180
Before modifying the migration template, refer the (Dynamodb Client SDK): http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#createTable-property and (Dynamodb Document Client SDK): http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#put-property links.
167181

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-dynamodb-local",
3-
"version": "0.2.9",
3+
"version": "0.2.10",
44
"engines": {
55
"node": ">=4.0"
66
},

0 commit comments

Comments
 (0)