Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
777 views

AWS DynamoDB Delete Item

I'm working on deleting DynamoDB item through Lambda. I have a simple table setup and Partition key is Date (Number) and I don't have sort key. I tested below command in AWS CLI (via CMD) and it is ...
Jay's user avatar
  • 1,191
0 votes
1 answer
497 views

Return all items from dynamodb ordered by date boto

I am attempting to return all items from a dynamodb table with results ordered by date. The tables structure is: ID Date Category Email Errors IsRead Message With ID as the primary key and date ...
RAH's user avatar
  • 476
0 votes
1 answer
3k views

Incrementing a counter in DynamoDB when value to be updated is in a map field

I have a lambda function that needs to retrieve an item from DynamoDB and update the counter of that item. But.. The DynamoDB table is structured as: id: int options: map some_option: 0 ...
Phrixus's user avatar
  • 1,219
1 vote
0 answers
155 views

AWS Cloudwatch Metrics for DynamoDB/SuccessfulRequestLatency/Minimum return unrecognized "StreamLabel"

I am using Boto to pull DynanmoDB metrics from Cloudwatch. But for SuccessfulRequestLatency/Minimum, I got unrecognized "StreamLabel" when i tried to build timeseries object for returned ...
Jian Cui's user avatar
0 votes
2 answers
2k views

Boto3 - How to filter out attributeType from scan() output using Python Boto3?

I'm using Boto3 to retrieve and return all data from a small dynamoDB table. My goal is to remove the attributeTypes from the output. The following is my output: {"Items": [{"...
Ryan's user avatar
  • 61
0 votes
1 answer
450 views

Boto3 unable to retrieve items from DynamoDB

So I am using DynamoDB to store the status of my Spark jobs. I have created Primary keys named scheduleTime(Partition key) and appName(Range key) and my spark jobs write the status of the jobs after ...
james.bondu's user avatar
  • 1,162
0 votes
0 answers
875 views

boto dynamodb conditional projectionexpression in query/scan alternative

I am a beginner in Python. I am trying to fetch query and scan results from dynamodb. As per the syntax, I am able to fetch the results using response = table.get_item( Key={ ...
lakshay's user avatar
  • 51
2 votes
2 answers
1k views

MFA authentication using Python boto for DynamoDb

I've a old code which looks like something below boto.dynamodb2.connect_to_region( region_name=AWS_REGION, aws_access_key_id=ACCESS_KEY_ID, aws_secret_access_key=...
Ganesh Satpute's user avatar
3 votes
1 answer
2k views

Unable to query on Partition key in DyanmoDB by boto3

I have one table TestTable and partition Key TestColumn. Inputs Dates: from_date= "2017-04-20T16:31:54.451071+00:00" to_date = "2018-04-20T16:31:54.451071+00:00" when I use equal query the date ...
Vivek Sable's user avatar
  • 10.2k
2 votes
1 answer
2k views

Auto populate timestamp in DynamoDB in python using boto3

Is it possible to have DynamoDB conditionally save a timestamp if the item is created? It looks like the AWS Java SDK provides this functionality via the @DynamoDBAutoGeneratedTimestamp annotation.
David Neale's user avatar
0 votes
1 answer
437 views

Dynamo db fails partially to update record

I have an app which updates the entries in dynamo-DB which is nothing but the updating UTC timestamp of the current time. I have a task where I am trying to update all 94000 records, using new UTC ...
ROHIT's user avatar
  • 51
0 votes
1 answer
1k views

How to ignore commas within cells when reading data from a CSV - Python

I am attempting to read data from a CSV file and load it into a DynamoDB table. The issue is that description is written in sentences and have commas. How do I read the columns with a comma delimiter, ...
Will Simpson's user avatar
1 vote
2 answers
4k views

AWS DynamoDB query fails when attribute have certain characters

If I run this query: data = table.query(KeyConditionExpression = Key('id').eq('fasfas'), FilterExpression=Attr(u'Absolute humidity[g/kg].3').eq(1)) I get the error: ClientError: ...
João Abrantes's user avatar
1 vote
2 answers
3k views

Using ProjectionExpression on List that contain maps

Say that this is the table struct: [{ name:"test", age:99, Info: [ { location:"A", num:11 }, { location:"B", num:99 } ] }] What i want to get is something like this: { name:...
Carlos Miguel Colanta's user avatar
0 votes
1 answer
3k views

Using Boto3, get put_item to replace an object in DynamoDB if certain attributes exist on the object?

I'm having issues getting Boto3's put_item to replace an object in DynamoDB if certain attributes (some of which are the primary keys of the DynamoDB table, and some of which are not) match up with ...
omnicon's user avatar
  • 109
5 votes
4 answers
10k views

AWS BotoCore Error - An AttributeValue may not contain an empty string

I'm trying to fill a DynamoDB database with data from an old event store made out of a PostgreSQL database. After it ran through a good portion of the db entries, this error was thrown when ...
danielschnoll's user avatar
0 votes
1 answer
452 views

How can i use FilterExpression over Nested Attributes in DynamoDB (Python)?

Here is my json model: item=item={"Company":"ABCD", "Industry":"Invest.Services", "Sector":"Financial", "Financial_Results": [...
Dineshkumar Vellingiri's user avatar
3 votes
0 answers
1k views

Unable to get Dynamodb table values in python

I have a DynamoDB table called "Users" Where there is only one partition key called "UserID" I have only two values in the table and would like to get all values from the value in the partition key. ...
Arsenal Fanatic's user avatar
0 votes
2 answers
1k views

DynamoDB: Is it possible to get the last element in the list datatype?

I have document that looks like as follows: {'id': 123, 'favorites': [5, 3, 7, 8, 1, 9, 2]} In this document, favorite is of list type. I want to query the latest favorite or first/last 5 favorites....
Humble Learner's user avatar
0 votes
1 answer
403 views

How can we access the DynamoDB tables of the Vagrant environment with the help of Python boto from our local machine?

I want to access the DynamoDB tables of my vagrant environment with the help of python Boto. I can access dynamoDB tables of vagrant env with the help of AWS CLI as below aws dynamodb list-tables --...
Bhavik Joshi's user avatar
  • 2,667
1 vote
1 answer
1k views

how to create a dynamodb table in python boto

I am following the below document to create table boto dynamodb documentation message_table_schema = conn.create_schema( hash_key_name='forum_name', hash_key_proto_value=str, ...
Bhavik Joshi's user avatar
  • 2,667
6 votes
2 answers
17k views

DynamoDB - How to query a nested attribute boto3

I am following the DynamoDB python tutorial. This step shows how to query the table based on a specific key: http://docs.aws.amazon.com/amazondynamodb/latest/gettingstartedguide/GettingStarted.Python....
Dalton Sweeney's user avatar
0 votes
1 answer
4k views

Query DynamoDB ISO-8601 Date index with less than condition

I have a DynamoDB Index storing a date in iso-8601 format, [i.e. '2017-03-17']. I'd like to query the Index for dates less than a certain date. [i.e datetime.now() - 30 days]. I believe this is ...
Mike's user avatar
  • 3
0 votes
2 answers
2k views

How to put Items into DynamoDB table using python?

I'm trying to put an Item into an Amazon DynamoDB table using a python script, but when I run the python script I get following error: Traceback (most recent call last): File "./table.py", line 32, ...
msc's user avatar
  • 34.5k
0 votes
0 answers
383 views

boto2 dynamodb put_item always creates a new item

I am using boto 2.45 and Python 2.7. Here is the code: import time import boto from boto.dynamodb2.layer1 import DynamoDBConnection from boto.dynamodb2.table import Table from boto.dynamodb2.fields ...
fhcat's user avatar
  • 1,223
18 votes
5 answers
42k views

How to batch_get_item many items at once given a list of primary partition key values

So, so I have a dynamodb table with a primary partition key column, foo_id and no primary sort key. I have a list of foo_id values, and want to get the observations associated with this list of ids. ...
Hillary Sanders's user avatar
1 vote
1 answer
3k views

How to add new attributes to a existing row without change existing attributes for Dynamodb Table

I have a table in DynamoDB with following attributes and respective values in a row. key attribute1 attribute2 attribute3 Now I want to add attribute5, attribute6, attribute7 to the same row in my ...
Vinay's user avatar
  • 725
1 vote
1 answer
6k views

check in dynamo db table if attribute exist and if it does then fail with reason - boto

I have following python code using boto: import boto3 # Get the service resource. dynamodb = boto3.resource('dynamodb', region_name='us-west-2') # Instantiate a table resource object without ...
Scooby's user avatar
  • 3,571
0 votes
0 answers
911 views

503 error DynamoDB local with boto3

I tried using the basic example in the aws documentation, by starting dynamoDB as follows. java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb And it produces the output ...
Janga reddy's user avatar
0 votes
0 answers
6k views

put_item with a map DynamoDB boto3

I have a json like this { "1555430188927137": { "0": { "FORM_R_5": { "status": 0, "rating": null, "feedback": null }, "2ABMEDIUM": { "status": ...
George150's user avatar
0 votes
2 answers
2k views

python boto error when inserting data to dynamodb

boto.dynamodb2.exceptions.ValidationException: ValidationException: 400 Bad Request {'__type': 'com.amazon.coral.validate#ValidationException', 'message': 'One or more parameter values were invalid: ...
Arpan Solanki's user avatar
9 votes
2 answers
21k views

Using Boto3 in python to acquire results from dynamodb and parse into a usable variable or dictionary

I'm trying to acquire the most recent entry into DynamoDB or to parse out the results I get, so I can skim the most recent item off the top. This is my code from __future__ import print_function # ...
Cfoote7's user avatar
  • 375
4 votes
2 answers
4k views

DynamoDB Parallel Scan not splitting results

I'm using the Segment and TotalSegments parameters to split my DynamoDB scan over multiple workers (as shown in the Parallel Scan section of the developer guide). However, all of the results get ...
Jonathan's user avatar
  • 15.3k
10 votes
1 answer
23k views

Putting/Updating item in DynamoDB fails for the UpdateExpression syntax

I've created a DynamoDB table, and in my Python code, I have the resource initialised as follows: self.dynamodb = self.session.resource('dynamodb').Table('aws-ci') The table has just one index/key, ...
hjpotter92's user avatar
  • 80.6k
0 votes
0 answers
898 views

How can I append an array of list in dynamodb using python

I want to append a list of array in dynamodb using python. I am using boto for the same. I am able to append the list in python and saving it in a variable. Now just wanted to append that value in an ...
User0706's user avatar
  • 1,085
0 votes
1 answer
284 views

dynamodb - add vector to field

In one of my tables in dynamodb have a field that contains a long vector of numbers. I would like to perform a vector addition to that field with another vector of numbers. Will this operation be ...
Mister_L's user avatar
  • 2,611
1 vote
2 answers
4k views

Retrieve a single item from DynamoDB using Python

I want to retrieve single item from DynamoDB but I'm unable to do that. I think I am missing something. I am able to scan the table using scan() function of boto but the fetching of a single item is ...
User0706's user avatar
  • 1,085
1 vote
1 answer
1k views

boto - delete fails because of schema mismatch

I have a table called Events, with deviceID as a primary key, and timeStamp as a sort key. Now I'm trying to delete an item given both of these keys: dynamodb = boto3.resource('dynamodb') ...
Mister_L's user avatar
  • 2,611
10 votes
2 answers
9k views

How to convert from DynamoDB wire protocol to native Python object manually with boto3?

I have a Lambda that is being triggered by a DynamoDB stream. The Lambda does some processing and then creates a notification on a topic in SNS. Ideally I would like to include the entire new ...
Mason's user avatar
  • 8,836
0 votes
1 answer
2k views

How to find index of a list in dynamodb?

I am using Python's boto3 for Amazon's api and dynamodb. I want to store id's of people who have liked a post. I am currently appending to that list when someone likes a post ( Each post has likedBy ...
kishorer747's user avatar
3 votes
1 answer
4k views

Dynamodb - query by GSI using python boto3

I`m using python boto3 to work with dynamodb. I've created a table using the following script: cls.table = dynamodb.create_table( TableName='table-unittest', KeySchema=[ {...
willian coelho's user avatar
2 votes
1 answer
1k views

Boto DynamoDb - JSONResponseError: 400 Bad Request - really weird behaviour

I'm working with the Boto DynamoDb2 API and I'm experiencing something really strange. First off, I'm using an IAM Role for authentication and the code I'm about to show is being run on an EC2 ...
mickzer's user avatar
  • 6,338
8 votes
2 answers
22k views

Dynamodb Update Item Expression with python boto3

I have a string field, "title". I am trying to update it with the update expression with persontable.update_item(Key={'person_id':person_id}, UpdateExpression="SET title = UPDATED") and I get An ...
George B's user avatar
  • 2,712
6 votes
2 answers
21k views

AWS DynamoDB - Load data with Boto3 using JSON file as input

I have multiple tables in Amazon DynamoDB, JSON Data is currently uploaded into the tables using the batch-write-item command that is available as part of AWS CLI - this works well. However I would ...
user1811107's user avatar
0 votes
1 answer
1k views

Boto DynamoDB not supporting dictionaries?

I have the following Python code that tries to store an item into DynamoDB. While everything works fine for strings, etc.. it fails when I try to add a dictionary. The table has one primary hash-key ...
Jeroen Jacobs's user avatar
3 votes
2 answers
7k views

How to calculate Dynamodb item size? Getting validationerror 400KB Boto

ValidationException: ValidationException: 400 Bad Request {u'message': u'Item size has exceeded the maximum allowed size', u'__type': u'com.amazon.coral.validate#ValidationException'} The item ...
ubhisat's user avatar
  • 413
1 vote
1 answer
662 views

Storing tweets in DynamoDB

I'm storing tweets in DynamoDB. I'm using the tweet's id property for the hash key and the tweet's created_at property for the range. I want to query on all the tweets in the table to find all tweets ...
Apollo's user avatar
  • 9,032
3 votes
1 answer
5k views

Create table in dynamoDB with LSI using boto

I know how to create a table using boto, but I cannot find any online help on creating a table that also includes an LSI. I have searched the boto docs, and the AWS docs. If you have a simple example ...
Mark's user avatar
  • 2,148
0 votes
0 answers
2k views

Index count on scan + filter expression -> overcoming ProvisionedThroughputExceededException

On a 10 million records dynamo db where each item has an 'epoch' time stamp attribute I'm trying to count the items between a range of epochs. The dynamo table has a provisioned read capacity units of ...
WhiteRabbit's user avatar
0 votes
2 answers
1k views

Adding Item data to a DynamoDB table using boto does not work

I have been trying to add items to a DynamoDB table using boto, but somehow it doesn't seem to work. I tried using users.Item() and users.put_item but nothing worked. Below is the script that I have ...
beginnercoder's user avatar