July 2018
Intermediate to advanced
350 pages
8h 47m
English
The following SAM template creates an Amazon DynamoDB with two keys to the table. Keep in mind this is just a reference, not the schema for the entire table to hold the hotel inventory:
HotelsListDynamoDB:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "hotelName"
AttributeType: "S"
-
AttributeName: "hotelId"
AttributeType: "N"
KeySchema:
-
AttributeName: "hotelName"
KeyType: "HASH"
-
AttributeName: "hotelId"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5