DynamoDb
Jump to navigation
Jump to search
Example DynamoDB table
example: add in resource/dynamodb-table.yml
see ideas: https://izara.io/wiki/index.php/Design_concepts
see ideas: https://izara.io/wiki/index.php/Service_-_Product_Manager
ex. Config table
ConfigTable:
Type: "AWS::DynamoDB::Table"
Properties:
TableName: ${self:custom.iz_resourcePrefix}Config
AttributeDefinitions:
- AttributeName: configKey
AttributeType: S
- AttributeName: configTag
AttributeType: S
KeySchema:
- AttributeName: configKey
KeyType: HASH
- AttributeName: configTag
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
ex. ProductRecord table
ProductRecordTable:
Type: "AWS::DynamoDB::Table"
Properties:
TableName: ${self:custom.iz_resourcePrefix}ProductRecord
AttributeDefinitions:
- AttributeName: productId
AttributeType: S
KeySchema:
- AttributeName: productId
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
//* add more table that your project use