-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
feature-requestNew feature or enhancement. May require GitHub community feedback.New feature or enhancement. May require GitHub community feedback.p3This is a minor priority issueThis is a minor priority issueworkaround-availableThis issue has a work around available.This issue has a work around available.
Description
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/[email protected]
Steps to reproduce
import { DynamoDBStreamEvent } from 'aws-lambda'
import { unmarshall } from "@aws-sdk/util-dynamodb"
export const handler = async (event) => {
for (const record of event.Records) {
if (record.dynamodb?.NewImage) {
const streamItem = record.dynamodb?.NewImage
const item = unmarshall(streamItem)
console.log(item)
}
}
}
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
markhker, sekhavati, Muthuveerappanv, dkaksl, ChristianRich and 8 more
Metadata
Metadata
Assignees
Labels
feature-requestNew feature or enhancement. May require GitHub community feedback.New feature or enhancement. May require GitHub community feedback.p3This is a minor priority issueThis is a minor priority issueworkaround-availableThis issue has a work around available.This issue has a work around available.