You can create a DynamoDB table using the following command:-
C:\Users\priyj_kumar>aws dynamodb create-table --table-name EmployeeDetail --attribute-definitions AttributeName=EmpID,AttributeType=S AttributeName=PhoneNo,AttributeType=S --key-schema AttributeName=EmpID,KeyType=HASH AttributeName=PhoneNo,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
The output that you will get will contain the schema of your table
{
"TableDescription": {
"AttributeDefinitions": [
{
"AttributeName": "EmpID",
"AttributeType": "S"
},
{
"AttributeName": "PhoneNo",
"AttributeType": "S"
}
],
"TableName": "EmployeeDetail",
"KeySchema": [
{
"AttributeName": "EmpID",
"KeyType": "HASH"
},
{
"AttributeName": "PhoneNo",
"KeyType": "RANGE"
}
],
"TableStatus": "CREATING",
"CreationDateTime": 1550827368.89,
"ProvisionedThroughput": {
"NumberOfDecreasesToday": 0,
"ReadCapacityUnits": 5,
"WriteCapacityUnits": 5
},
"TableSizeBytes": 0,
"ItemCount": 0,
"TableArn": "arn:aws:dynamodb:us-east-1:2453******395:table/EmployeeDetail",
"TableId": "10688***************bd066b"
}
}
You can see in your console that your database has been created.
Hope this helps.