Item Attributes

Amazon Dynamo DB is schema-less, as you don’t have to specify non-key attributes at the time of table creation.

Data types

DynamoDB Data types are divided into 3 categories Scalar, Document and Set.

scalar-type

  • Key attributes can only be of scalar types String, Number and *Binary
  • Maximum size of Partition Key is 2048 bytes
  • Maximum size of Sort Key is 1024 bytes

document-type

  • A List type attribute can store an ordered collection of values.

  • Lists like arrays are enclosed in square brackets: [ … ]

  • Elements of the list can be of different types

  • Elements in a list are accessed using 0 index, like in JSON arrays

  • A Map type attribute can store an unordered collection of name-value pairs.

  • Maps are enclosed in curly braces: { … }

  • Map is used for storing JSON data

set-type

  • All the elements within a set must be of the same type. 
  • There are 3 types of sets that are supported
  • No limit on the number of elements as long as they can fit with the 400KB item size limit