serverless_resources/dynamodb.yml
Resources:
DynamoDbTable:
Type: 'AWS::DynamoDB::Table'
Properties:
TableName: ${self:custom.prefix}-H1_CANDLES
# TableName: H1_CANDLES_${self:provider.stage}
# specify kind(schema: hash or range) and type(atttribute) of the key
KeySchema:
-
AttributeName: pareName
KeyType: HASH
-
AttributeName: time
KeyType: RANGE
AttributeDefinitions:
-
AttributeName: pareName
AttributeType: S
-
AttributeName: time
AttributeType: S
# secify capacity unit
ProvisionedThroughput:
ReadCapacityUnits: 2
WriteCapacityUnits: 2