FAQ Database Discussion Community


Delete item from DynamoDB php

php,amazon-dynamodb
Can't seem to get my head round deleting items from dynamo db in php. I would like to delete all items with a specific user_id. Firstly I get all the users items like so: $users = $this->ddb->getIterator('Query', array( 'TableName' => 'users', 'KeyConditions' => array( 'user_id' => array( 'AttributeValueList' => array(...

Assigning a unique ID every time android app is opened

android,amazon-dynamodb,multiple-users
I am creating an app whose main purpose is to collect data for experiments, which it uploads to a database at the end of each experiment. I want to assign a unique identifier each time the experiment is run (either opening the app, or restarting the experiment). I cannot use...

Dynamo DB Concepts

amazon-web-services,amazon-dynamodb
I know some of the questions I am going to be asked will be so silly, but I am new to Dynamo Db and I have a lot of confusion about it. My questions are : After going through concept of Hash and Range key through this post What is...

Indexing notifications table in DynamoDB

amazon-web-services,notifications,amazon-dynamodb
I am going to implement a notification system, and I am trying to figure out a good way to store notifications within a database. I have a web application that uses a PostgreSQL database, but a relational database does not seem ideal for this use case; I want to support...

DynamoDb with sort?

node.js,sorting,amazon-dynamodb,inverted-index
I'm very new to the Dynamo Db concept so forgive me if my question is a bit stupid I have a file how looks like that Appel,www.appel.com,www.cnn.com,www.bla.com.... Blabla,www.test.com,www.fox.com,www.bla.com..... test,www.test.com,www.fox.com,www.bla.com... www.appel.com,300 www.cnn.com,400 and so on. In short each line is 1: a word and all the URL's she in them 2:...

Querying DynamoDB on non-key attributes

ios,amazon-web-services,amazon-dynamodb
Is it possible to filter DynamoDB queries using non-key attributes in AWS version 2 ? Amazon says that they can do it: http://amzn.to/1FVgQ9B. But do they also give the API? I found AWSDynamoDBQueryExpression, but I think it only lets filtering on the range key (not enough documentation). I'm looking for...

Is It possible to change value of Range key in DynamoDB Table?

java,amazon-dynamodb
I know it may be a very silly question, but I am new to DynamoDB. My doubt is is it possible to update the value of a Range Key in DynamoDB. Suppose My Table is "TEST" { ID : PK/HK Date : RK Name : GSI Add : LSI }...

Amazon DyanamoDB ,Using filter expressions with scan operations in Java

amazon-dynamodb,database-scan
I am trying to get all the items whose price is greater than a certain value,but not able to use the filter expressions correctly. import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.regions.Region; import com.amazonaws.regions.Regions; import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient; import com.amazonaws.services.dynamodbv2.document.DynamoDB; import...

DynamoDB “OR” conditional Range query

amazon-dynamodb
Let's assume my table looks like: Code |StartDate |EndDate |Additional Attributes... ABC |11-24-2015 |11-26-2015 | .... ABC |12-12-2015 |12-15-2015 | .... ABC |10-05-2015 |10-10-2015 | .... PQR |03-24-2015 |03-27-2015 | .... PQR |05-04-2015 |05-08-2015 | .... Provided a Code (c) and a date range (x, y), I need to be...

DynamoDB Conditional Check Fail Monitoring

c#,asp.net,amazon-web-services,session-state,amazon-dynamodb
I have used dynamodb-session to set DynamoDB for Asp.net Session state provider. In my ASP.NET_SessionState table in DynamoDb There is "Conditional CheckFailed " monitoring. My question is: In what condition these exceptions happen and how can I reduce them?...

Indexing on nested field

amazon-dynamodb
I'm trying to create an index on a nested field, using the Dashboard in AWS Developer Console. E.g. if I have the following schema: { 'id': 1, 'nested': { 'mode': 'mode1', 'text': 'nice text' } } I was able to create the index on nested.mode, but whenever I then go...

Socket exception when putting data on Amazon DynamoDB

amazon-web-services,amazon-dynamodb
We are inserting 20000 records into dynamo db using single insertion. There are 10 concurrent requests at a given point of time. Each item size is around 200-300kb in size. However, we keep getting SocketException:Connection reset when doing the insertion. Also the log shows it as INFO, so does this...

How to update a Map or a List on AWS DynamoDB document API?

java,amazon-dynamodb
The new AWS DynamoDB document API allows 2 new data types that correspond directly to the underlying JSON representation: Map (aka JSON object) and List (aka JSON array). However, I can't find a way to update attributes of these data types without completely overwriting them. In contrast, a Number attribute...

DynamoDB: How to use a query filter to check for conditions in a MAP

java,amazon-web-services,amazon-dynamodb,aws-sdk
I have a table and the structure looks like this: When I do a query, I would like to be able to do a query filter on the data map; but I'm not exactly sure how to setup the query. This is what I have so far: HashMap<String, AttributeValue> map...

Verifying the attribute in DynamoDB without using scan?

amazon-dynamodb
How to verify an attribute whether it present in table or not without using scan in dynamodb? In my usecase, From client side, The customer request with their Customer_id for knowing the values of the product. In server side, have to check whether the entered customer_id already present in DynamoDB...

AWS DynamoDB multiple “NE” string filters?

java,android,search,amazon-dynamodb
I'm trying to scan/query an AWS DynamoDB table for a list of items where id (a single string) is not equal to any of strings A, B, C, D, etc. I've tried something like this: for (String itemString : items) { scanExpression.addFilterCondition("id", new Condition().withComparisonOperator(ComparisonOperator.NE) .withAttributeValueList(new AttributeValue().withS(itemString))); } PaginatedScanList<Items> result =...

Exception while importing data to dynamodb using data pipeline

amazon-dynamodb,control-characters
I setup data pipeline to import data into dynamodb database. I created a script which which would match the syntax of the dynamodb export. Below is the sample output, DateAdded^C{"s":"2009-11-10T18:19:00-07:00"}^BASIN^C{"s":"B001AMUFSE"} DateAdded^C{"s":"2009-11-10T18:19:00-07:00"}^BASIN^C{"s":"B0013IWYHU"} DateAdded^C{"s":"2009-11-10T18:17:00-07:00"}^BASIN^C{"s":"B000P62ND6"} when I feed this file to data pipeline I'm getting error org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row...

AWS Update table not working

amazon-web-services,nosql,amazon,amazon-dynamodb
I'm uisng updateTable of DynmaoDB and I'm passing the following params object: { "TableName": "movies", "AttributeDefinitions": [{ "AttributeName": "subtitle", "AttributeType": "S" }], "GlobalSecondaryIndexUpdates": [{ "Create": { "IndexName": "subtitle", "ProvisionedThroughput": { "ReadCapacityUnits": "5", "WriteCapacityUnits": "5" }, "KeySchema": [{ "AttributeName": "subtitle", "KeyType": "HASH" }], "Projection": { "ProjectionType": "ALL" } } }], "ProvisionedThroughput":...

How to query a Dynamo DB having a GSI with only hashKeys using DynamoDBMapper

amazon-dynamodb,secondary-indexes
I am very new to Dynamo DB and may be this is very trivial question, but i went through the documents of Dynamo DB and stack overflow questions but i couldnt find a single link which tells how to query DDB for GSI which has only hash key and there...

DynamoDB data modeling

java,amazon-dynamodb
Having a java BitSet representing user uniques, I would like to store into DynamoDB in order to use queries like "give me all BitSets from date X to date Y with a concrete key". My first approach was to use a primary key representing what I really want to count,...

Is it possible to get items from DynamoDB where the primary key ends with a given string?

ruby,amazon-web-services,amazon-dynamodb,aws-sdk
Is it possible, using the AWS Ruby SDK (or just DynamoDB in general), to get an item or items from a table that uses a primary key only, and where that primary key ends with a certain string? I haven't come across anything in the docs that explicitly answers this...

Does Boto support the map and list DynamoDB types, and JSON document type?

amazon-dynamodb,boto
Could someone, please, confirm whether or not at present (Apr. 2015) Boto supports the DynamoDB JSON document, and map and list datatypes? If yes, could someone provide simple code examples?...

DynamoDB JsonMarshaller cannot Deserialize List of Object

java,jackson,amazon-dynamodb
I have a Java class which is the data-model of a table in DynamoDB. I want to use the DynamoDBMapper to save and load items from Dynamo. One member of the class is a List<MyObject>. So I used the JsonMarshaller<List<MyObject>> to serialize and de-serialize this field. The list can be...

Should I always create my DynamoDB tables using hash and range primary key type?

amazon-dynamodb
In the docs (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/APISummary.html) it states: You can query only tables whose primary key is of hash-and-range type and we recommend that you design your applications so that you can use the Query operation mostly, and use Scan only where appropriate It's not directly stated, but does this make it...

Using group by in DynamoDB

python,amazon-web-services,amazon-dynamodb,boto
For a project I have to use DynamoDB(aws) and python(with boto). I have items with a date and I need to display the count grouped by date or by month. Something like by date of the month [1/2: 5, 2/2: 10, 3/2: 7, 4/2: 30, 5/2: 25, ...] or by...

Loading records for secondary index

ios,amazon-web-services,amazon-dynamodb,validationexception
I am trying to implement user registration and login using DynamoDB. There's three ways a user can login. They can use username, phone Number or Email Id to login. My DynamoDB table has Phone Number as hash in primary index and thus I am able to load it properly using...

How do I use camel-ddb to persist json payload

apache-camel,amazon-dynamodb
I have created and table in dynamodb (EU-WEST-1) and I have created a camel route to put a json payload into the table. My route looks like this: String dynamoDbEndpoint = String.format("aws-ddb://tablename?accessKey=%s&secretKey=RAW(%s)&tableName=tablename&amazonDdbEndpoint=dynamodb.eu-west-1.amazonaws.com",awsAccessKey,awsSecretKey); from("direct:ipg-queue").to(dynamoDbEndpoint) I get the error message: com.amazonaws.AmazonServiceException: 1 validation error detected: Value null at 'item' failed to satisfy...

Use multiple regions from ryanfitz/vogels

amazon-web-services,amazon-dynamodb
I use Ryan Fitz' Vogels NodeJS package to access DynamoDB. I have the same tables in multiple regions and I need to access these tables from a single NodeJS instance. How can I specify the region per table?

DynamoDB create index on map or list type

amazon-web-services,amazon-dynamodb
I'm trying to add an index to an attribute inside of a map object in DynamoDB and can't seem to find a way to do so. Is this something that is supported or are indexes really only allowed on scalar values? The documentation around this seems to be quite sparse....

AWS DynamoDB Scan and FilterExpression using array of hash values

javascript,amazon-web-services,amazon-dynamodb
I am having a hard time finding a useful example for a scan with FilterExpression on a DynamoDB table. I am using the javascript SDK in the browser. I would like to scan my table and return only those records that have HASH field "UID" values within an array I...

Creating multiple GSIs by updateTable - DynamoDB

amazon-web-services,nosql,amazon,amazon-dynamodb
I'm uisng updateTable of DynmaoDB and based on the documentation, if we want to create multiple Global Secondary Indexes (GSIs) we need to have multiple objects in "GlobalSecondaryIndexUpdates" field, so I'm passing the following params, but it does not update the GSIs; however if I'm just creating one GSI (passing...

Query for products in a certain category

amazon-dynamodb
I have a simple "products" table in DynamoDb. Each product has a categories attribute which is a set of category ids like this: [{ "N" : "4" },{ "N" : "5" },{ "N" : "6" },{ "N" : "8" }] The products table has id (hash key) and accountId (range...

what the ideal way to query dynamoDB from web app?

amazon-web-services,amazon-dynamodb,iam,amazon-iam
I'm trying to query DynamoDB from my web application. I successfully did that after using IAM and creating 3rd party Roles and make users log in my web app through Facebook or Google, my app obtained a token and created the AWS credentials. Now, I want any user of my...

DynamoDBNumberError on trying to insert floating point number using python boto library

python,amazon-web-services,floating-point,amazon-dynamodb,boto
Code snippet : conn = dynamo_connect() company = Table("companydb",connection=conn) companyrecord = {'company-slug':'www-google-com12','founding-year':1991, 'randomlist' :[1,2,3,4,5], 'randomdict' : {'a':[1,2,3],'b':'something','randomnumber':10.55} } company.put_item(data=companyrecord) I am getting the following error: File "C:\Python27\lib\site-packages\boto\dynamodb2\items.py", line 329, in prepare_full final_data[key] = self._dynamizer.encode(value) File "C:\Python27\lib\site-packages\boto\dynamodb\types.py", line 279, in encode...

IAM policy to allow access to DynamoDB console for specific tables

amazon-dynamodb,iam
Is it possible to create an AWS IAM policy that provides access to the DynamoDB console only for specific tables? I have tried: { "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt0000000001", "Action": [ "dynamodb:DescribeTable", "dynamodb:ListTables", <other actions> ], "Effect": "Allow", "Resource": [ "arn:aws:dynamodb:<region>:<account>:table/FooTable", "arn:aws:dynamodb:<region>:<account>:table/BarTable" ] } ] } but for...

Automatically offload dynamo table to cloud search domain

amazon-web-services,amazon-dynamodb,amazon-cloudsearch
I'm using Dynamo DB pretty heavily for a service I'm building. A new client request has come in that requires cloud search. I see that a cloud search domain can be created from a dynamo table via the AWS console. My question is this: Is there a way to automatically...

Projecting attributes to indices using dynamodb mapper

java,amazon-dynamodb
I just can't find the way to project selected attributes (not hashkey) into indices using dynamodb mapper annotations. Consider an example: @DynamoDBTable(tableName = "scores") public class DynaScoreItem { @DynamoDBHashKey int user; @DynamoDBRangeKey int level; @DynamoDBAttribute int score; @DynamoDBIndexRangeKey(localSecondaryIndexName = "sort_by_added") long added; } I just want to add score to...

Calibrating throughput of DynamoDB tables

amazon-dynamodb,throughput
I have a few tables that need throughput provisioning. Most of the time, these tables have a low background level of read and write calls. But during specific jobs, it can experience quick bursts of read/write requests. In your opinion what's a good practice in choosing these provisioned throughput numbers?...

Proper example of updating a DynamoDB item with nested map

php,amazon-dynamodb
I must be missing something simple here. The goal of this test is to set a new element in an existing Map. The following PHP test function works fine to update the item, but instead of setting the person attribute's (a Map) middle initial value to "T", it creates a...

Using toJSONPretty();

json,amazon-web-services,amazon-dynamodb
I am trying to work with JSON objects with DynamoDB and am having difficulty. I'm trying to follow the tutorial: http://aws.amazon.com/blogs/aws/dynamodb-update-json-and-more/ I wanted to use toJSONPretty(); on my object but the method is not recognized. I don't think I have the right gradle dependencies. I"m currently using: compile 'com.amazonaws:aws-android-sdk-core:2.2.0' compile...

Amazon DynamoDB Mapper - limits to batch operations

amazon-web-services,amazon-dynamodb
I am trying to write a huge number of records into a dynamoDB and I would like to know what is the correct way of doing that. Currently, I am using the DynamoDBMapper to do the job in a one batchWrite operation but after reading the documentation, I am not...

AWS DynamoDB Batch Get Request - iOS

ios,objective-c,amazon-web-services,amazon-dynamodb
I can perform a simple Get request on a singular table within AWS dynamoDB however when I expand it to a Batch Request across multiple tables I continue to get a error validation error detected: Value null at 'requestItems.rip.member.keys' failed to satisfy constraint I understand this as the values not...

Storing integer that all mobile users can access

ios,database,amazon-dynamodb
I want to make a database for an iOS application consisting of groups that can have the same name. I am hosting my database on AWSDynamo. Since multiple groups can have the same name, I was planning on having a groupID as the hashkey, unless someone can suggest a better...

Datsac Cassandra binding with Apache Cassandra

hbase,bigdata,amazon-dynamodb,cassandra-2.0,bigtable
I am tryng to use the Datsax Cassandra (community endition) , but not able to figure out the Datasax git repo for the same . Can someone please help me out in figuring out which release of apache cassandra is used by Datasax cassandra (Community edition ) ??? or does...

Multiple inheritance from classes 'NSObject' and 'AWSDynamoDBObjectModel'

ios,swift,amazon-dynamodb
I am trying to create DynamoDB object model class in Swift to represents my table structure and use it to perform CRUD operations. In the AWSiOSSDKv2 library (my version 2.0.17) changelog there is information to use AWSDynamoDBObjectModel instead of AWSDynamoDBModel. When my class inherit from NSObject, AWSDynamoDBObjectModel, AWSDynamoDBModeling I receive...

Dynamodb data model for process/transaction monitoring

nosql,data-modeling,amazon-dynamodb
I am wanting to keep track of multi stage processing job. Likely just need the following fields batchId (guid) | eventId (guid) | statusId (int) | timestamp | message (string) There are relatively small number of events per batch. I want to be able to easily query events that have...

Some doubts using cloudwatch metrics for dynamodb

amazon-web-services,amazon-dynamodb,boto
I created a dynamodb table. And now Im trying to create a cloudwatch alarm to send a sns notification when tables request exceed 80% for 1 hour (as it appear when we create a dynamodb table using aws managment console). My doubts are: First: I need to create two cloud...

DynamoDb with ConditionExpression

amazon-web-services,amazon-dynamodb
Consider the following DynamoDb table: TableName: foo-bar HashKey: Foo, str RangeKey: Bar, str Name: Baz, str Now with the vogels API I'm trying to insert an item with a HashKey, a new RangeKey, and a Name. But the Name must not exist for the given HashKey: So we define the...

Recommended way to “join” dynamodb table with reference table

nosql,amazon-dynamodb
Let's say I got a table in dynamodb called visits which represents websites visits and one of the columns is the location. In an RDBMS I would have: visits [id, website_id, ........, location_id ] ref_locations [id, city, country, postcode, lat, long] The query we want to do is get me...

DynamoDB Retrieve an Item using iOS mobile SDK

ios,mobile,amazon-web-services,sdk,amazon-dynamodb
I'm starting with AWS mobile SDK for iOS and can't get to load an item properly. I have the entity mapped fine because I can save an item to the DynamoDB table. My problem is that I can't get the information after the load operation. I'm following this AWS docs,...

How to load data to Dynamo DB Table with Global and Local Secondary Indexes ??

java,amazon-web-services,amazon-dynamodb
I have created some tables in Dynamo DB using AWS console and defined some global and secondary indexes. Now the problem is how to load data in those tables using AWS SDK of java. I went through the Developer guide (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) of Dynamo DB but I could not find how...

Its not possible print items that have empty fields in dynamodb?

amazon-web-services,amazon-dynamodb,boto
I have this code below to scan all items in my users table and then print the name of each item. And Im printing the field name of each item, and its working correctly when all items have the field name filled. But when some item dont have the field...

Order results in DynamoDB scan

ios,swift,amazon-web-services,amazon-dynamodb
Is it possible to order the results when scanning a DynamoDB table, before getting the data returned to the user? In SQL, it is possible to run a query like SELECT * FROM posts ORDER BY creationDate DESC. Is it possible to do this with a scan (or with a...

How to query a DynamoDB GSI with a RangeKey that uses a marshaller

nosql,amazon-dynamodb
I have a table, in that I have a secondary index. My secondary index uses DynamoDB marshalling. How do I query the table on this GSI? The addRangeKeyCondition, supports only withS, and withN methods. How do I query it with my object? This is how I query it if the...

unable to create table in dynamodb-local - aws

node.js,amazon-web-services,amazon-dynamodb
I'm using dynamoDB-local with nodejs code. I have the following code: var aws = require("aws-sdk") aws.config.update({"accessKeyId": "aaa", "secretAccessKey": "bbb", "region": "us-east-1"}) var awsdb = new aws.DynamoDB({ endpoint: new aws.Endpoint("http://localhost:8000") }); awsdb.createTable({ TableName: 'myTbl', AttributeDefinitions: [ { AttributeName: 'aaa', AttributeType: 'S' }, ], KeySchema:[ { AttributeName: 'aaa', KeyType: 'HASH' } ]...

Add or remove an entry from a List type attribute in a DynamoDB table item

list,amazon-web-services,amazon-dynamodb
I have a very simple class, with a string type primary key and List type attributes. I want to write APIS for adding and removing an item from the attribute list and saving the changes back to DDB. The simplest solution I can think of is: - Read the list...

How to get maximum element from a table from DynamoDb AWS Console?

json,amazon-web-services,nosql,amazon-dynamodb
I am trying to create a database table in NoSQL in order to be able to retrieve the element with a maximum value in one of its columns. Suppose the SQL schema looks like this: Table_Page PageId: int(10) - PK Name: varbinary(255) RevisionId: int(10) - FK Table_Revision RevisionId: int(10) -...

Nested Query in DynamoDB returns nothing

java,amazon-dynamodb
I'm using DynamoDB with the Java SDK, but I'm having some issues with querying nested documents. I've included simplified code below. If I remove the filter expression, then everything gets returned. With the filter expression, nothing is returned. I've also tried using withQueryFilterEntry(which I'd prefer to use) and I get...

Scan operation for getting a list of hash keys in DynamoDB table?

amazon-web-services,amazon-dynamodb
I want to know whether I have to use a dynamodb "Scan" operation for getting a list of all hash key values in a dynamodb table or is there an another "less-expensive" approach to do that. I have tried with a "Query" operation, but it was unsuccessful in my case,...

In what situation do you use Simple Hash Keys on DynamoDB?

database,amazon-web-services,amazon-dynamodb,key-value-store
Simple Hash Keys seem to be too simple to write an article, while many write about Composite Hash/Range Keys, because Composite Hash/Range Keys are useful for many complex situations. But I believe that in common applications, many of tables should be designed with Simple Hash Keys. In what situation do...

How to determine index data type in DynamoDB Java SDK

java,amazon-dynamodb
I've been trying to figure out how to determine the data type (in my case String or Number) of indexes and global secondary indexes of an Amazon DynamoDB table. I'm using the java sdk to interact with DynamoDB. I've been using the TableDescription class which gives me a lot of...

DynamoDB query on boolean key

node.js,amazon-web-services,nosql,amazon,amazon-dynamodb
I'm new to DynamoDB (and to noSQL in general) and am struggling a little to get my head round some of the concepts. One thing in particular is giving me some problems, which is around querying a table based on a boolean key. I realise that I can't created a...

Cannot marshall type class without a custom marshaler or @DynamoDBDocument annotation

java,spring-mvc,amazon-web-services,amazon-dynamodb,spring-restcontroller
Error: com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMappingException: Cannot marshall type class [Ljava.lang.String; without a custom marshaler or @DynamoDBDocument annotation. I want to store data to DynamoDB from java Spring MVC REST. I am making the post request which calls a method to load all the data to Amazon DynamoDB. Here is my code. RestController: @RestController...

DynamoDB Secondary Index on Multi-Value Type

database-design,nosql,amazon-dynamodb
I have a table that has a hash key of type Number and an attribute that is a multi-value set of numbers. Assume the hash key is a group_id and the multi-value set is a set of members of that group (user_ids) I want to be able to query Which...

Amazon DynamoDB table w/ Elastic Beanstalk not setting up correct parameters

java,amazon-web-services,amazon-ec2,amazon-dynamodb
I have an example Dynamodb project from Amazon that when uploaded to an instance of Elastic Beanstalk environment, generates a Dynamodb table. Howevever, after generating the table is missing a few parameters. Here is the code to the Elastic Beanstalk instance: /* * Copyright 2010-2013 Amazon.com, Inc. or its affiliates....

DynamoDB schema for filtering users by attributes

database-schema,amazon-dynamodb
We are looking to replace our current RDBMS database and have been thinking a few alternatives. We have a large amount of time-series information which we kind of have a good idea on how to represent in Dynamo DB without issues. We currently store people attributes per person in the...

How to setup Tables in DynamoDB to be able to query a string set/List?

nosql,amazon-dynamodb
Currently, I have a table in DynamoDB with this schema: ID : PostID (Hash Key) Location : LocationID (Range Key) Tags: List of strings Now I want to be able to query the Tags list and for each item in the table and find which Posts have those tags. How...

Getting/Updating A Counter in DynamoDB

amazon-web-services,amazon-dynamodb
Architectural question. As part of a game, we were looking at keeping track of number of items that have been completed across all players. No problem keeping track of a players status, dynamo shards nicely across the users. But if I want a single number that shows how many of...

What's the difference between BatchGetItem and Query in DynamoDB?

amazon-web-services,amazon-dynamodb,aws-sdk
I've been going through AWS DynamoDB docs and, for the life of me, cannot figure out what's the core difference between batchGetItem() and Query(). Both retrieve items based on primary keys from tables and indexes. The only difference is in the size of the items retrieved but that doesn't seem...

Inserting items in DynamoDB Range key

java,amazon-web-services,amazon-dynamodb
I have created a DynamoDB table with following details: and I'm trying to insert items in my table: public static void insertItems() { AmazonDynamoDBClient ddb = UserPreferenceDemoActivity.clientManager .ddb(); DynamoDBMapper mapper = new DynamoDBMapper(ddb); try { UserPreference userPreference = new UserPreference(); userPreference.setNavn("SalonSol"); for (int i = 800; i <= 1600; i...

dynamodb boto put_item of type Map “M”

python,django,amazon-web-services,amazon-dynamodb,boto
Has anyone successfully performed a put operation of a map into dynamodb using boto (python)? I basically need to put a json object. So far I have only been able to put it as json string but I cannot find an example of inserting a map anywhere. Thanks a lot....

How can I retrieve all the values from a particular column in amazon DynamoDB?

java,spring-mvc,amazon-web-services,amazon-dynamodb
For example, if my Question table has columns question_id, options,timestamp, I must retrieve all the values of only 'question_id'. Is it possible?...

Querying DynamoDB table by hash and range key

ruby,amazon-web-services,amazon-dynamodb
I want to query DynamoDB table by hash and range key, using AWS SDK for Ruby V2. Following code can work. dynamodb = Aws::DynamoDB::Client.new(region: 'somewhere') dynamodb.query( table_name: TABLE_NAME, key_conditions: { HASH_KEY_NAME => { attribute_value_list: ['hoge'], comparison_operator: 'EQ' }, RANGE_KEY_NAME => { attribute_value_list: ['foo'], comparison_operator: 'EQ' } } ) But, I...

Difference between AmazonDynamoDBClient and DynamoDB classes in their java SDK?

java,amazon-web-services,amazon-dynamodb
I am using Amazon's DynamoDB java SDK and want to know the difference between the AmazonDynamoDBClient and DynamoDB classes. I can't seem to find anything on them since there appears to be very little documentation. Is there any reason I should use one or the other? Are their any major...

DyanamoDB - Global Secondary Index using GetItemRequest using Hash and Range

amazon-web-services,amazon-dynamodb
I am trying to use the Java AWS sdk to get a document based on a Global Secondary Index. Setup as follows: Hash Key: MyId - Number Range Key: MyDate - String Here is my code to: Map<String, AttributeValue> key = new HashMap<String, AttributeValue>(); key.put("MyId", new AttributeValue().withN("1234")); key.put("MyDate", new AttributeValue().withS("2014-10-12"));...

Amazon AWS DynamoDB Help Picking Primary Key

ios,sql,mobile,amazon-web-services,amazon-dynamodb
I'm developing an iPhone app and I am hoping to retrieve events from a DynamoDB (Amazon Web Services) using their latitude and longitude (get events close to the user). Their is other information that each event has, and would also be retrieved when querying the database. My question, however, is...

Retrieve distinct values from the hash key - DynamoDB

python,nosql,amazon-dynamodb,boto
I have a dynamodb table to store email attribute information. I have a hash key on the email, range key on timestamp(number). The initial idea for using email as hash key is to query all emails by per email. But one thing I trying to do is retrieve all email...

How to assign foreignkey in DynamoDB?

amazon-dynamodb
I'm trying to use the Dynamo DB. I am trying to test the Dynamo DB Tables But I can't Get Foreign Key in this.

AWS DynamoDB and Android Development (Put Item into table in DynamoDB)

java,android,eclipse,amazon-web-services,amazon-dynamodb
I am having problem regarding getting the items into DynamoDB table. I tried the code i wrote but the Apps crashed and i am lost of what have I Below are may codes for references. AddItem method public void AddItem() { DynamoDB db = new DynamoDB(client); Table table = db.getTable(tableName);...

AWS DynamoDB Scan filterExpression - simple number comparison

amazon-web-services,expression,amazon-dynamodb
I am trying to do a simple dynamoDB scan with a filter expression (documentation here) This is my expression string: "attribute_exists("my_db_key") AND ("my_db_key" = 1)" This simply states: "If a value for my_db_key exists AND my_db_key EQUALS 1, return it in the results" However it does not work and I...

Is There a Better AWS Alternative to DynamoDB for a Simple Binary File Store

amazon-web-services,amazon-dynamodb
We are implementing a 'trusted client' model in our mobile app where the server just stores 'blobs' and has no knowledge of their content, other than the version number. The blobs can be used for static data and saved user data. We need to be ready to store 100 million...

Read throughput in DynamoDB

amazon-dynamodb
Ok, so my understanding of read units is that it costs 1 read unit per item, unless the item exceeds 4KB in which case read units = ceiling(item size/4). However when I submit a scan asking for 80 items (provisioned throughput is 100), the response returns a ConsumedCapacity of either...

Number of attributes in key schema must match the number of attributes defined in attribute definitions

amazon-dynamodb,dynamo-local
I’m trying to create a simple table using DynamoDB javascript shell and I’m getting this exception: { "message": "The number of attributes in key schema must match the number of attributes defined in attribute definitions.", "code": "ValidationException", "time": "2015-06-16T10:24:23.319Z", "statusCode": 400, "retryable": false } Below is the table I’m trying...

How can I get the list if all items persisting in my dynamoTable?

java,amazon-web-services,amazon-dynamodb
How can I get the list if all items persisting in my dynamoTable? All the examples I have seen there I have to pass hash key values. I want some operation for select * from X table;

How to find DynamoDB all table names that match a pattern?

amazon-dynamodb
I need to find all DynamoDB existing table names that start with a given string. What is the best/recommended way to do this? I need to do this, for example to find all tables, whose name starts with "__Test__" and then delete all these tables....

Deleting Data from DynamoDb Table automatically

amazon-web-services,amazon-dynamodb
Is there any kind of life retention period concept in DynamoDB. I mean is there any way such that data inside a table will be deleted after some time like we can set some retention period in S3. Thanks,...