A DynamoDB 24 table declares only its key; other attributes vary freely per item. BookNest's key is the numeric id, a partition (HASH) key alone, so GetItem fetches one book and Scan reads all six:
BooksTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
TableName: booknest-books
BillingMode: PAY_PER_REQUEST
AttributeDefinitions: [{AttributeName: id, AttributeType: N}]
KeySchema: [{AttributeName: id, KeyType: HASH}]
PointInTimeRecoverySpecification: {PointInTimeRecoveryEnabled: true}On-demand billing (PAY_PER_REQUEST) suits small, spiky traffic; PROVISIONED suits steady, forecastable load. Point-in-time recovery keeps continuous backups over a period of 1 to 35 days. The Retain policies keep the catalog through stack deletion or replacement (Deletion Policies), as cfn-guard's guard rule requires. A Scan suits six items; a large catalog would add a global secondary index on genre and Query it.