Simple Atomic Counter with DynamoDB and API Gateway

Simple Atomic Counter with DynamoDB and API Gateway

A web application often needs a central counter. It is based on API Gateway — Dynamo DB integration. It has a very good response time and minimal cost. DynamoDB is a hosted NoSQL database offered by Amazon Web Services (AWS). The API Gateway is a versatile service to configure and export API’s to the external world

A web application often needs a central counter. We have several simple use-cases like the member id for a registration application. Or the amount collected on a sales application — there are many that we all have seen. We have to make sure the concurrent updates do not clash, and the no data is lost in the process. This problem increases further when our application scales larger on the cloud — with millions of concurrent users.

It is best to avoid such a use case — in large scale applications. It is always advisable that we use a design that does not need an atomic counter — for example using UUID instead of an increasing number. But there are times where we just need the counter. When I found myself in such a situation, here is a solution that I used. It is based on API Gateway — Dynamo DB integration. It has a very good response time and minimal cost.

serverless aws dynamodb api developer

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire AWS Developer

Looking to Hire Professional AWS Developers? The technology inventions have demanded all businesses to use and manage cloud-based computing services and Amazon is dominating the cloud computing services provider in the world. **[Hire AWS...

Hire Dedicated AWS Developer

Want to Hire AWS Developer for cloud computing services? At **[HourlyDeveloper.io](https://hourlydeveloper.io/ "HourlyDeveloper.io")**, we leverage maximum benefits from the AWS platform ensuring prominent Solutions for business requirements....

Serverless Express – Easy APIs On AWS Lambda & AWS HTTP API

Serverless Express enables you to easily host Express.js APIs on AWS Lambda and AWS HTTP API. Here is how to get started and deliver a Serverless Express.js based API with a custom domain, free SSL certificate and much more!

A Simple Guide to API Development Tools

APIs can be as simple as 1 endpoint for use by 100s of users or as complex as the AWS APIs with 1000s of endpoints and 100s of thousands of users. Building them can mean spending a couple of hours using a low-code platform or months of work using a multitude of tools. Hosting them can be as simple as using one platform that does everything we need or as complex as setting up and managing ingress control, security, caching, failover, metrics, scaling.

AWS Lambda Rest Api | Rest Api Using AWS Lambda, DynamoDB and Serverless Framework

In this video, we take a look at building a rest api using aws lambda and dynamodb using the serverless framework. Serverless architecture can seem a little ...