File tree Expand file tree Collapse file tree
packages/amplify-appsync-simulator/src/data-loader/dynamo-db Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,12 +29,17 @@ export class DynamoDBDataLoader implements AmplifyAppSyncSimulatorDataLoader {
2929 private tableName : string ;
3030
3131 constructor ( private ddbConfig : DynamoDBLoaderConfig ) {
32- const { tableName, endpoint } = ddbConfig . config ;
32+ const { tableName, endpoint, credentials } = ddbConfig . config ;
3333 if ( ! tableName || ! endpoint ) {
3434 throw new Error ( `Invalid DynamoDBConfig ${ JSON . stringify ( ddbConfig , null , 4 ) } ` ) ;
3535 }
3636 this . tableName = tableName ;
37- this . client = new DynamoDBClient ( { ...ddbConfig . config , ...ddbConfig . options } ) ;
37+ this . client = new DynamoDBClient ( {
38+ endpoint,
39+ region : ddbConfig . config . region ,
40+ credentials,
41+ ...ddbConfig . options ,
42+ } ) ;
3843 }
3944
4045 async load ( payload ) : Promise < object | null > {
You can’t perform that action at this time.
0 commit comments