Skip to content

Increment value in DynamoDB table #71

Open
@besasch88

Description

@besasch88

Hi! Thanks for the library! I've a question: Is it possible to update an item stored in the dynamoDB table incrementing a value without read it, update the value and finally write again.

Using the aws-sdk you can do something like it:
dynamoDB.updateItem({ TableName: "Users", Key: { "UserId": { S: "c6af9ac6-7b61" } }, ExpressionAttributeValues: { ":inc": {N: "1"} }, UpdateExpression: "ADD loginCount :inc" })
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions