Introduction to Amazon DynamoDB

DynamoDB is a key-value, noSQL database developed by Amazon. It’s unlike some other products offered by Amazon and other vendors because it’s not just an open source system, like Spark, hosted on the vendor’s platform. Amazon wrote this for their own internal needs and now they allow it to be available with their customers.

How does DynamoDB work?

DynamoDB looks just like JSON, with the one difference being that each JSON record must include the record key. That has the benefit that it lets you do updates on a record. In a JSON database, like MongoDB, we cannot update records. Instead you must delete them then add back the changed version to effect the same change.

DynamoDB also enables you to use transactions, something that MongoDB supports.. Not all noSQL databases let you do that. This is important as assured database operations logically must go together. For example, a sales transaction must both decrement inventory and increase cash-on-hand. If one of those two operations failed then the sales and inventory systems would be out of balance.

Work with the database using the AWS command line client, APIs for dissimilar programming languages, their NoSQL workbench desktop tool, or on the Amazon AWS website. For example, the screen below shows how you create a table.

Get more info on AWS Online Training

DynamoDB Definitions

DynamoDB has these concepts and more:

Table: a collection of items

Item: a collection of attributes. (Other databases call these records or documents.)

Stream: like a cache that holds changes in memory awaiting they are  qflush to storage.

Partition key: the primary key. It must be unique.

Partition key and sort key: a composite primary key, meaning a partition key with more than one attribute, like employee name and employee ID (necessary because two employees could have the same name).

Secondary indexes: you can index other attributes that you frequently query to increase reads.


As with many cloud systems, DynamoDB exposes its services via web services. But that does not mean you have to format your data to JSON and then post it using HTTP. Instead they provide software development kits (SDKs). The SDK takes the requests you return it and then translates that to HTTP calls behind the scenes. In this way, the SDK provides a more natural and far less wordy way to work with the database. The SDK lets you work with DynamoDB as you would work with usual objects.

The SDK has these methods:

  • PutItem
  • BatchWriteItem
  • GetItem
  • BatchGetItem
  • Query
  • Scan
  • UpdateItem
  • DeleteItem
  • ListStreams
  • GetShardIterator
  • GetRecords
  • TransactWriteItems
  • TransactGetItems


As with other Amazon products uses the AWS command line client. That allows you to run database operations from the command line without having to write an application. You use JSON to work with DynamoDB.

For example, there are these operations and a few more:

  • aws dynamodb create-table
  • aws dynamodb put-item


DynamoDB has SDKs for these programing languages:

  • Java
  • JavaScript
  • .NET
  • js
  • PHP
  • Python
  • Ruby
  • C++
  • Go,
  • Android
  • iOS

For Java and .NET, they provide objects. For which let you work with table items as if they were objects in those programming languages. And it translates from data types, letting you use, like, you need to use dates and bytes instead of being restricted to facsimiles of the as strings or numbers, as you would with JSON.

For more details about AWS online course CLICK HERE

Contact us for more details +919989971070 or visit us

Comments are closed