File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/idempotency/src/persistence Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -81,15 +81,17 @@ class DynamoDBPersistenceLayer extends BasePersistenceLayer {
8181 this . staticPkValue =
8282 config . staticPkValue ?? `idempotency#${ this . idempotencyKeyPrefix } ` ;
8383
84- this . client = new DynamoDBClient ( config ?. clientConfig ?? { } ) ;
85- if ( config ?. awsSdkV3Client ) {
86- if ( isSdkClient ( config . awsSdkV3Client ) ) {
87- this . client = config . awsSdkV3Client ;
88- } else {
84+ if ( config . awsSdkV3Client ) {
85+ if ( ! isSdkClient ( config . awsSdkV3Client ) ) {
8986 console . warn (
9087 'awsSdkV3Client is not an AWS SDK v3 client, using default client'
9188 ) ;
89+ this . client = new DynamoDBClient ( config . clientConfig ?? { } ) ;
90+ } else {
91+ this . client = config . awsSdkV3Client ;
9292 }
93+ } else {
94+ this . client = new DynamoDBClient ( config . clientConfig ?? { } ) ;
9395 }
9496 addUserAgentMiddleware ( this . client , 'idempotency' ) ;
9597 }
You can’t perform that action at this time.
0 commit comments