Skip to content

Commit 6f66b19

Browse files
committed
docs: README update with sessionToken and any other config supported
1 parent 9eb27eb commit 6f66b19

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Put options under `custom.appsync-simulator` in your `serverless.yml` file
6767
| dynamoDb.region | localhost | Dynamodb region. Specify it if you're connecting to a remote Dynamodb intance. |
6868
| dynamoDb.accessKeyId | DEFAULT_ACCESS_KEY | AWS Access Key ID to access DynamoDB |
6969
| dynamoDb.secretAccessKey | DEFAULT_SECRET | AWS Secret Key to access DynamoDB |
70+
| dynamoDb.sessionToken | DEFAULT_ACCESS_TOKEEN | AWS Session Token to access DynamoDB, only if you have temporary security credentials configured on AWS |
71+
| dynamoDb.* | | You can add every configuration accepted by DynamoDB |
7072
| watch | - \*.graphql<br/> - \*.vtl | Array of glob patterns to watch for hot-reloading. |
7173

7274
Example:

src/getAppSyncConfig.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,10 @@ export default function getAppSyncConfig(context, appSyncConfig) {
5454

5555
switch (source.type) {
5656
case 'AMAZON_DYNAMODB': {
57-
const {
58-
endpoint,
59-
region,
60-
accessKeyId,
61-
secretAccessKey,
62-
sessionToken,
63-
} = context.options.dynamoDb;
64-
6557
return {
6658
...dataSource,
6759
config: {
68-
endpoint,
69-
region,
70-
accessKeyId,
71-
secretAccessKey,
72-
sessionToken,
60+
...context.options.dynamoDb,
7361
tableName: source.config.tableName,
7462
},
7563
};

0 commit comments

Comments
 (0)