Articles → AWS → Create A DynamoDB Table Using AWS CLI
Create A DynamoDB Table Using AWS CLI
Configure CLI
Write Command To Create A Table
- Id
- ArticleName
aws dynamodb create-table
--table-name Articles
--attribute-definitions
AttributeName=Id,AttributeType=N
AttributeName=ArticleName,AttributeType=S
--key-schema
AttributeName=Id,KeyType=HASH
AttributeName=ArticleName,KeyType=RANGE
--provisioned-throughput
ReadCapacityUnits=1,WriteCapacityUnits=1
Attribute Name | Description |
---|
--table-name | Specifies the name of the table |
--attribute-definitions | Specifies the column name (AttributeName attribute) and their data types (AttributeType attribute). |
--key-schema | Specifies the partition key and the sort key.KeyType = HASH means partition key and KeyType = RANGE means sort key |
--provisioned-throughput | Specifies the read and write capacity. |
Click to Enlarge
Output
Click to Enlarge