KEMBAR78
Dynamo DB Command | PDF
0% found this document useful (0 votes)
54 views4 pages

Dynamo DB Command

The document describes the creation of an EmployeeDetail table in AWS DynamoDB with a primary key of EmpID as the hash key and PhoneNo as the range key. It then inserts a sample item into the table with EmpID of "ED1" and PhoneNo of "12344".

Uploaded by

Dharmen Namdev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views4 pages

Dynamo DB Command

The document describes the creation of an EmployeeDetail table in AWS DynamoDB with a primary key of EmpID as the hash key and PhoneNo as the range key. It then inserts a sample item into the table with EmpID of "ED1" and PhoneNo of "12344".

Uploaded by

Dharmen Namdev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

//-------------------------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

You might also like