July 2018
Intermediate to advanced
350 pages
8h 47m
English
The following SAM template creates an Amazon DynamoDB instance with multiple keys to the table. Bear in mind that this is just a reference, not the schema for the entire table to hold a cart item with a hotel:
CartItemsDynamoDB: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: "cartId" AttributeType: "S" - AttributeName: "hotelId" AttributeType: "N" - AttributeName: "customerId" AttributeType: "N" - AttributeName: "tripStartDate" AttributeType: "N" - AttributeName: "tripEndDate" AttributeType: "N" - AttributeName: "adults" AttributeType: "N" - AttributeName: "children" AttributeType: "N" KeySchema: - AttributeName: "cartId" KeyType: "HASH" - AttributeName: "hotelId" KeyType: "RANGE" ProvisionedThroughput: ...
Read now
Unlock full access