Yan Cui
I help clients go faster for less using serverless technologies.
This article is brought to you by
Don’t reinvent the patterns. Catalyst gives you consistent APIs for messaging, data, and workflow with key microservice patterns like circuit-breakers and retries for free.
Just a quick note to say that another minor update to DynamoDB.SQL has been release, you can view the release notes here.
The latest update adds support for a TSQL style WITH keyword for specifying optional parameters for tweaking the query/scan operation. For queries, you can specify the NoConsistentRead and PageSize options to use eventually consistent read and throttle the number of items returned per request respectively. Similarly for scans, you can use the PageSize option for throttling your scan requests too, but the DynamoDB scans does not support strong consistency.
According to DynamoDB best practices, you should avoid sudden bursts of read activity, using the new PageSize option you can make sure that your query/scan does not consume too many read capacity unit in a short burst and end up causing more critical reads to be throttled.
For example, a query which returns 10 items per request using eventually consistent read will look something like this:
whereas a scan will look like:
For more details about the full syntax, please refer to the Getting Started document, which has been updated to include the new WITH keyword.
Enjoy!
Whenever you’re ready, here are 3 ways I can help you:
- Production-Ready Serverless: Join 20+ AWS Heroes & Community Builders and 1000+ other students in levelling up your serverless game. This is your one-stop shop for quickly levelling up your serverless skills.
- I help clients launch product ideas, improve their development processes and upskill their teams. If you’d like to work together, then let’s get in touch.
- Join my community on Discord, ask questions, and join the discussion on all things AWS and Serverless.