How to insert a record in DynamoDB Table using AWS CLI

0 votes
Can anyone help me with the command to insert a record into a table in DynamoDB using AWS CLI?
Feb 22, 2019 in AWS by Nabarupa
2,620 views

1 answer to this question.

0 votes

Here is the table that I have created and will insert an item to that.

https://www.edureka.co/community/39042/how-to-create-a-dynamodb-using-aws-cli

C:\Users\priyj_kumar\Desktop>aws dynamodb put-item --table-name EmployeeDetail --item "{""EmpID"":{""S"":""ED1""},""PhoneNo"":{""S"":""12344""}}" --return-consumed-capacity TOTAL

You must escape the double quotes else it won't work. This will give an output like this.

{
    "ConsumedCapacity": {
        "TableName": "EmployeeDetail",
        "CapacityUnits": 1.0
    }
}

Hope this helps.

answered Feb 22, 2019 by Priyaj
• 58,090 points

Related Questions In AWS

0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,170 points
19,078 views
0 votes
1 answer

How to create a DynamoDB table in AWS?

Creating a DynamoDB table is made very ...READ MORE

answered Feb 22, 2019 in AWS by Priyaj
• 58,090 points
967 views
0 votes
1 answer

How to create a DynamoDB using AWS CLI?

You can create a DynamoDB table using ...READ MORE

answered Feb 22, 2019 in AWS by Priyaj
• 58,090 points
1,729 views
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer

Unable to insert record in DynamoDB using a Json file in CLI

The best practice will be: running this command ...READ MORE

answered Feb 22, 2019 in AWS by Priyaj
• 58,090 points
1,510 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP