How to insert a record in DynamoDB stored in a json file using CLI?

0 votes
Can someone help me with the command to insert a record stored in a json file?
Feb 22 in AWS by Shuvodip
349 views

1 answer to this question.

0 votes

The command is the same as that you use normally, all you need to do is replace the data to the file location. Its better to navigate to the location where your json file is.

C:\Users\priyj_kumar\Desktop>aws dynamodb put-item --table-name YourTableName --item file://filename.json --return-consumed-capacity TOTAL

The output that you will receive is as follows:-

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

Hope this helps.

answered Feb 22 by Priyaj
• 56,520 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,090 points
3,716 views
–1 vote
1 answer

How to read a csv file stored in Amazon S3 using csv.DictReader

The code would be something like this: import ...READ MORE

answered Oct 25, 2018 in AWS by Archana
• 5,560 points
7,453 views
0 votes
1 answer
+1 vote
2 answers
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 in AWS by Priyaj
• 56,520 points
39 views
0 votes
1 answer