Open maxm450 opened 3 years ago
unmarshall
will also not convert binary attributes properly. The DynamoDB stream will provide a base64 encoded presentation of the binary attribute and unmarshall
does not base64-decode the value.
I'm still seeing this issue in 3.34.0
.
Interestingly there are no type errors if my package only contains @aws-sdk/util-dynamodb
. But as soon as I install @aws-sdk/client-dynamodb
the aforementioned TypeScript errors pop up.
From my brief testing with unmarshall
it behaved as expected prior to installing @aws-sdk/client-dynamodb
, so as a workaround I've set a @ts-ignore
on the problematic line of code for now.
Hey everyone, apologies the issue fell out of queue. A lot of changes and features were added to the latest package. Is it still an persisting issue with the latest version. I was able to use unmarshall
correctly used: https://www.npmjs.com/package/@aws-sdk/lib-dynamodb.
Yes, this is still an issue as the types are not compatible. More info about it in DefinitelyTyped/DefinitelyTyped#51331
Any updates on this one? I think this is also related to: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/51331
unmarshall
will also not convert binary attributes properly. The DynamoDB stream will provide a base64 encoded presentation of the binary attribute andunmarshall
does not base64-decode the value.
I'm facing the same behavior here and I'm not sure what to do here. Should this be reported in a separate issue?
Describe the bug
TS types seems to cause an issue when unmarshing a dynamoStream
Argument of type '{ [key: string]: AWSLambda.AttributeValue; }' is not assignable to parameter of type '{ [key: string]: import("/node_modules/@aws-sdk/client-dynamodb/dist/types/models/models_0").AttributeValue; }'.
Your environment
SDK version number
@aws-sdk/util-dynamodb@3.23.0
Steps to reproduce
Observed behavior
receiving typing issue for AttributeValue type.
Expected behavior
should be able to unmarshall a Dynamo object, wherever the object comes from a stream event or a getItem action from the DynamoClient