A primary key uniquely identifies each item in the table, so no
two items can have the same key. DynamoDB supports two
different kinds of primary keys:
▪ Partition key
▪ Partition key and sort key
▪ Partition key
A simple primary key, composed of one attribute known as the
partition key.
▪ Partition key and Sort Key
It is Referred to as a composite primary key, this type of key is
composed of two attributes. The first attribute is the partition
key, and the second attribute is the sort key.
▪ DynamoDB uses the partition key value as input to an internal
hash function. A composite primary key gives you additional
flexibility when querying data
xxxxxxxxxx
People
{
"PersonID": 101,
"LastName": "Smith",
"FirstName": "Fred",
"Phone": "555-4321"
}
{
"PersonID": 102,
"LastName": "Jones",
"FirstName": "Mary",
"Address": {
"Street": "123 Main",
"City": "Anytown",
"State": "OH",
"ZIPCode": 12345
}
}
{
"PersonID": 103,
"LastName": "Stephens",
"FirstName": "Howard",
"Address": {
"Street": "123 Main",
"City": "London",
"PostalCode": "ER3 5K8"
},
"FavoriteColor": "Blue"
}
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html