AWSTemplateFormatVersion: '2010-09-09'
Resources:
dbTable:
Type:
AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "userid"
AttributeType: "S"
-
AttributeName: "todoid"
AttributeType: "S"
BillingMode:
PAY_PER_REQUEST
KeySchema:
-
AttributeName: "userid"
KeyType: "HASH"
-
AttributeName: "todoid"
KeyType: "RANGE"
TableName: todos
참고: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html