0

I recently started working on API Gateway with DynamoDB. Its going really cool, as it is that easy to expose a database operation as a service using API Gateway.

I am currently looking at Data integrity side of things, as we are going to use this combo for a sensitive use case. How can I improve data integrity when I use API Gateway + DynamoDB.

This documentation from AWS explains 'Optimistic locking' from JAVA & .Net SDK perspective - http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.OptimisticLocking.html

But when I use dynamodb through API gateway, how can I enable 'Optimistic locking' ? As I won't be using Java / .Net SDKs. I don't see any related documentation.

Or I don't have to worry about Data integrity side of things, if I use API Gateway in front of DynamoDB. Just thinking this way, because even the update / getItem operation doesn't talk about it :)

Any thoughts ?

Cheers

3
  • Data integrity will still be a problem you will need to solve. You will have to implement optimistic locking on the client side. Commented Jun 5, 2016 at 23:57
  • @Shibashis Thanks, you mean to say I will have to build a custom optimistic locking mechanism myself ? like introduce a custom field for versions and manually check them in my code ? Because my client is just going to invoke a REST endpoint for read and write. Commented Jun 6, 2016 at 2:16
  • yes. You will have use client side logic with conditional writes feature of dynamo Commented Jun 6, 2016 at 3:18

1 Answer 1

2

Building optimistic locking is possible with the help of Conditional Writes no matter which language you are using to access DynamoDB.

More information about Conditional Writes: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.