//-------------------------create table-------------------------
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
You will see
"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"
//-----------------check Table status--------
aws dynamodb describe-table --table-name Music | grep TableStatus
//----------------------------------insert item(Row)----------------------------------------
C:\Users\priyj_kumar\Desktop>aws dynamodb put-item --table-name EmployeeDetail --item
"{""EmpID"":{""S"":""ED1""},""PhoneNo"":{""S"":""12344""}}" --return-consumed-capacity TOTAL
you see-->
"ConsumedCapacity": {
"TableName": "EmployeeDetail",
"CapacityUnits": 1.0
}
}
//------------structure of table
aws dynamodb describe-table --table-name MusicCollection
//show table
aws dynamodb scan --table-name Users
//Show the particular item(Row)
//Update in a Table(Change Item Val or Add Col)
//Quering a Table