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
Error
It appears there is a type incompatibility between the XRay and AWS-SDK libraries.
The following boilerplate code returns an error:
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
import AWSXRay from 'aws-xray-sdk-core';
const client: DynamoDBClient = AWSXRay.captureAWSv3Client(new DynamoDBClient({}));
There error is:
Argument of type 'DynamoDBClient' is not assignable to parameter of type 'Client<any, any, any>'.
Types of property 'middlewareStack' are incompatible.
Property 'identifyOnResolve' is missing in type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>' but required in type 'MiddlewareStack<any, any>'.ts(2345)
Investigation
From what I've been able to assess, it seems the XRay library is using @smithy/types version ^3.3.0 (via @aws-sdk/types ^3.4.0) whereas the AWS SDK DynamoDB client library uses @smithy/types version ^1.1.0. The latter uses an additional generic parameter when declaring the Client class which seems to be the root cause of the issue.
I believe this issue is related to this one. I imagine there is a similar type incompatibility there. Not sure if this is a bug here and the version should be downgraded or if this should be raised to the AWS SDK team.
Package versions:
@aws-sdk/client-dynamodb: ^3.369.0
aws-xray-sdk-core: ^3.4.0
The text was updated successfully, but these errors were encountered:
Hello,
Error
It appears there is a type incompatibility between the XRay and AWS-SDK libraries.
The following boilerplate code returns an error:
There error is:
Argument of type 'DynamoDBClient' is not assignable to parameter of type 'Client<any, any, any>'.
Types of property 'middlewareStack' are incompatible.
Property 'identifyOnResolve' is missing in type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>' but required in type 'MiddlewareStack<any, any>'.ts(2345)
Investigation
From what I've been able to assess, it seems the XRay library is using @smithy/types version ^3.3.0 (via @aws-sdk/types ^3.4.0) whereas the AWS SDK DynamoDB client library uses @smithy/types version ^1.1.0. The latter uses an additional generic parameter when declaring the Client class which seems to be the root cause of the issue.
I believe this issue is related to this one. I imagine there is a similar type incompatibility there. Not sure if this is a bug here and the version should be downgraded or if this should be raised to the AWS SDK team.
Package versions:
The text was updated successfully, but these errors were encountered: