Questions tagged [amazon-dynamodb]

Amazon DynamoDB is a proprietary closed-source cloudnative key-value and document database optimized for horizontal scaling. It's a fully managed, multiregion, multimaster database with built-in security, backup and restore, and in-memory caching for internet-scale applications. DynamoDB is hosted on AWS, but also has a local deployment option just for development and functional testing. Used on amazon.com.

Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. It enables customers to offload the administrative burdens of operating and scaling distributed databases to AWS so they don’t have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling.

With a few clicks in the AWS Management Console or by making use of the Amazon Dynamo DB API, customers can launch a new Amazon DynamoDB database table, scale up or down their request capacity for the table without downtime or performance degradation, and gain visibility into resource utilization and performance metrics.


Related tags :

13785 questions
79
votes
13 answers

Easier DynamoDB local testing

I'm using DynamoDB local for unit testing. It's not bad, but has some drawbacks. Specifically: You have to somehow start the server before your tests run The server isn't started and stopped before each test so tests become inter-dependent unless…
Oliver Dain
  • 9,617
  • 3
  • 35
  • 48
78
votes
9 answers

How can I fetch all items from a DynamoDB table without specifying the primary key?

I have a table called products with primary key Id. I want to select all items in the table. This is the code is I'm using: $batch_get_response = $dynamodb->batch_get_item(array( 'RequestItems' => array( 'products' => array( …
Warrior
  • 5,168
  • 12
  • 60
  • 87
76
votes
5 answers

Query condition missed key schema element : Validation Error

I am trying to query dynamodb using the following code: const AWS = require('aws-sdk'); let dynamo = new AWS.DynamoDB.DocumentClient({ service: new AWS.DynamoDB( { apiVersion: "2012-08-10", region: "us-east-1" }), …
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
74
votes
1 answer

Update attribute "timestamp" reserved word

I need to update the timestamp attribute in my dynamodb table using boto3 but the attribute name "timestamp" is a reserved word so it's throwing an error on the SET command. table.update_item( Key={ 'id': item_id }, …
Cread Dotson
  • 982
  • 1
  • 7
  • 18
74
votes
3 answers

PropertyDefinition inconsistent

I have following template that i am using in cloudformation UI to create dynamoDB table. I want to create a table with PrimaryKey as ID and sortKey as Value { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "DB Description", …
Em Ae
  • 8,167
  • 27
  • 95
  • 162
74
votes
4 answers

DynamoDB query() versus getItem() for single-item retrieval based on the index

If I'm retrieving a single item from my table based on the indexed hash key, is there a performance difference between query() or getItem()?
ensnare
  • 40,069
  • 64
  • 158
  • 224
73
votes
9 answers

DynamoDB Batch Update

Is there any API in DynamoDB to update a batch of items? There is an API to write new items in batches (BatchWriteItem) and update single item using UpdateItem, but is it possible to update multiple items in one call?
user1846749
  • 2,165
  • 3
  • 23
  • 36
73
votes
10 answers

Example of update_item in dynamodb boto3

Following the documentation, I'm trying to create an update statement that will update or add if not exists only one attribute in a dynamodb table. I'm trying this response = table.update_item( Key={'ReleaseNumber': '1.0.179'}, …
Dmitry R
  • 2,956
  • 4
  • 25
  • 45
73
votes
3 answers

3 fields composite primary key (unique item) in Dynamodb

I am trying to create a table to store invoice line items in DynamoDB. Let's say the item is defined by CompanyCode, InvoiceNumber and LineItemId, amount and other line item details. A unique item is defined by the combination of the first 3…
HHH
  • 801
  • 1
  • 6
  • 10
72
votes
3 answers

How to prevent creating a new item in UpdateItem if the item does not exist

I am running an AWS Lambda service written in Node.js that interacts with a DynamoDB database. One of my methods performs an update (AWS.DynamoDB.DocumentClient().update) on DynamoDB to update a specific item. My problem is, however, that when I try…
Stanley
  • 5,261
  • 9
  • 38
  • 55
72
votes
4 answers

Change the schema of a DynamoDB table: what is the best/recommended way?

What is the Amazon-recommended way of changing the schema of a large table in a production DynamoDB? Imagine a hypothetical case where we have a table Person, with primary hash key SSN. This table may contain 10 million items. Now the news comes…
Dimitre Novatchev
  • 240,661
  • 26
  • 293
  • 431
70
votes
7 answers

DynamoDB - Key element does not match the schema

I'm trying to update an Item in my Dynamodb Table +Users+. I have tried many different ways but I always received the same error message: The provided key element does not match the schema The creation of an Item works, as well as a query but not…
user6178502
  • 715
  • 1
  • 5
  • 7
70
votes
5 answers

how to return items in a dynamodb on aws-cli

So, I have a DynamoDB table Users and I want to return all the contents of this table. Or maybe even some. I tried aws dynamodb query --table-name Users and it says I have to specify key-condition or key-condition-expression, so I added the…
beejm
  • 2,381
  • 1
  • 10
  • 19
70
votes
4 answers

how to put an Item in aws DynamoDb using aws Lambda with python

Using python in AWS Lambda, how do I put/get an item from a DynamoDB table? In Node.js this would be something like: dynamodb.getItem({ "Key": {"fruitName" : 'banana'}, "TableName": "fruitSalad" }, function(err, data) { if (err) { …
Jordan
  • 1,564
  • 2
  • 13
  • 32
69
votes
4 answers

"The provided key element does not match the schema" error when getting an item from DynamoDB

This is the table partition key setting The table content When I tried to get an item from the table, it prints this error botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the GetItem operation: The…
Keoros
  • 1,337
  • 2
  • 13
  • 23