Hi, nice article. I Wrote something similar some time ago, because indeed switching to V3 is not so straightforward.
from my tests you dont really need marshalling/ unmarshalling if you use the DynamoDBDocumentClient. (it is the same confusion as with V2 between the DynamoDBClient and DynamoDBDocumentClient)
import {DynamoDBClient} from "@aws-sdk/client-dynamodb";
import {DynamoDBDocumentClient, PutCommand} from "@aws-sdk/lib-dynamodb";
const dynamoClient = new DynamoDBClient()
const documentClient = DynamoDBDocumentClient.from(dynamoClient)
const params = {
Item: {
"Artist": "No One You Know",
"SongTitle": "Call Me Today",
"Year": 2001
}
},
TableName: "Music"
};
const response = await documentClient.send(new PutCommand(params))
Hi, nice article. I Wrote something similar some time ago, because indeed switching to V3 is not so straightforward.
from my tests you dont really need marshalling/ unmarshalling if you use the DynamoDBDocumentClient. (it is the same confusion as with V2 between the DynamoDBClient and DynamoDBDocumentClient)
I wrote some samples here
This is great, thank you!