Install a Local Instance of AWS DynamoDB



STEP 1:  Press Command+Space and type Terminal and press enter/return key.
STEP 2:  Install Brew(If you don't already have it installed.)  Run this command in the Terminal app.


ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null


Then press enter and wait for the command to finish.
STEP 3:  Use Brew to install and download dynamoDB so that you can run it locally.

brew install dynamodb-local


Launch your DynamoDB local instance like this:
To have start dynamodb-local now and restart at login as a background service using brew services:

  brew services start dynamodb-local

Or, if you don't want/need a background service you can just run:

  /usr/local/bin/dynamodb-local


You can then access a JS Shell in a browser such as Chrome:
URL to hit the Javascript shell for your locally running DynamoDB instance:

http://localhost:8000/shell/


This is what you will see what you load up your DynamoDB Shell.  If you see this, then you are successfully running a local instance of DynamoDB!

AWS Local DynamoDB Javascript Shell in Browser
AWS Local DynamoDB Javascript Shell in Browser


Common DynamoDB Concepts
  • Table:  A collection of data
  • Items: An item is a group of attributes that is uniquely identifiable among all of the other items.
  • Attributes: An attribute is a fundamental data element, something that does not need to be broken down any further.
  • Primary Key
    • Partition Key:  Composed of one attribute known as the partition key
    • Partition Key and Sort Key: Composite primary key, composed of two attributes.


Datatypes
Scalar
  • Number:  String
    • Example:  "N": "123.45"
  • String:  String
    • Example:  "S": "Hello"
  • Binary:  Base64-encoded binary data
    • Example:  "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
  • Boolean:  Boolean
    • Example:  "BOOL": true
  • Null:  Boolean
    • Example:  "NULL": true
Multi-value
  • String Set:  Array of Strings
    • Example:  "SS": ["Giraffe", "Hippo" ,"Zebra"]
  • Number Set:  Array of Strings
    • Example:  "NS": ["42.2", "-19", "7.5", "3.14"]
  • Binary Set:  Array of Base64-encoded binary data
    • Example:  "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

Document
  • List: array of AttributeValue objects
    • Example:  "L": ["Cookies", "Coffee", 3.14159]
  • Map:  String to AttributeValue object map
    • Example:  "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}



Partition Key Hashing

Partition key uniquely identifies a item
Partition key is used for building an unordered hash index
Allows table to be partitioned for scale





Some further reading on DynamoDB

Comments

  1. Thanks for sharing most valuable information with us.
    AWS Online Training

    ReplyDelete
  2. Poker online situs terbaik yang kini dapat dimainkan seperti Bandar Poker yang menyediakan beberapa situs lainnya seperti http://62.171.128.49/hondaqq/ , kemudian http://62.171.128.49/gesitqq/, http://62.171.128.49/gelangqq/, dan http://62.171.128.49/seniqq. yang paling akhir yaitu http://62.171.128.49/pokerwalet/. Jangan lupa mendaftar di panenqq silahkan dicoba ya boss serta salam hoki

    ReplyDelete
  3. Learn AWS, microsoft azure, prince2 foundation in cognex because cognex is the best institute in chennai to teach AWS. Cognex providing all courses both in online and offline. Cognex is ablest in teaching AWS, cognex is the AWS Training in chennai

    ReplyDelete
  4. It's like you understand the topic well, but forgot to include your readers. Maybe you should think about it from several angles.

    Data Science Course

    ReplyDelete
  5. Best informative blog. this is best for all coders. Please check our website for new article Audit firms in dubai

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. If you desire to pursue a Bachelor Of Computer Application, the multi-faceted career has masses of blessings for an aspirant. Aspirants with BCA levels can method sectors like IT, transport, software program, finance, buying and selling, training, and so forth. https://www.georgecollege.org/bca-course

    ReplyDelete
  8. Nice article, Thanks for sharing.

    ReplyDelete
  9. Really Helpful Content. I appreciate you for taking the time and effort to share your knowledge. Also checkout my website. interior designing course in kolkata

    ReplyDelete
  10. At APTRON Solutions Noida, we understand the importance of practical, hands-on learning. Our Javascript Training in Noida curriculum is carefully crafted to provide a perfect blend of theoretical knowledge and real-world application. With our industry-expert trainers, you'll gain a deep understanding of JavaScript concepts, along with valuable insights into best practices and industry trends.

    ReplyDelete

Post a Comment

Popular posts from this blog

Change Port on a Spring Boot Application when using intelliJ

How to set up a SQL Server 2008 Local Database

New Personal Website