Both the AWS SDK v2 and v3 provide a javascript-friendly interface called the DocumentClient. Instead of using the AttributeValue format, such as { S: "hello" } or { N: "123" }, the DocumentClient enables you to use native javascript types, e.g. "hello" or 123.
AWS SDK V2
For the SDK V2 client, cast it to TypeSafeDynamoDBv2.
Fixes #22
Document Client
Both the AWS SDK v2 and v3 provide a javascript-friendly interface called the
DocumentClient
. Instead of using the AttributeValue format, such as{ S: "hello" }
or{ N: "123" }
, theDocumentClient
enables you to use native javascript types, e.g."hello"
or123
.AWS SDK V2
For the SDK V2 client, cast it to
TypeSafeDynamoDBv2
.See: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html
AWS SDK V3
When defining your Command types, specify the
JsonFormat.Document
type parameter to adapt it to theDocumentClient
interface.See: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/modules/_aws_sdk_lib_dynamodb.html
For the SDK V3 client, cast it to
TypeSafeDynamoDBv3
.