Put item fails with amazon api.

Bug #1368060 reported by Ajaya Agrawal
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I am using the below script to connect to magnetodb and put a item. The last line puts an item which gives 500 in magneto log.
from boto.dynamodb2.layer1 import DynamoDBConnection

connection_data = {}
connection_data['aws_access_key_id'] = '23fdab5cfbf24fbe967dab9f2a1f5e8b'
connection_data['aws_secret_access_key'] = 'ed4d7c8ea5ec46e3a69cb9a7ea1665ed'
connection_data['is_secure'] = False
connection_data['host'] = 'localhost'
connection_data['port'] = 8480
connection_data['region'] = 'RegionOne'

conn = DynamoDBConnection(**connection_data)
users = Table.create('users', schema=[HashKey('name',
data_type=STRING), RangeKey('salary', data_type=NUMBER)],connection=conn)
users.put_item(data={'email':'aj', 'salary':1000})

Tags: dynamodb-api
tags: added: dynamo-api
Changed in magnetodb:
milestone: none → kilo-1
importance: Undecided → Low
Changed in magnetodb:
milestone: kilo-1 → kilo-2
Revision history for this message
Ilya Sviridov (isviridov) wrote :


Return: '{"__type":"com.amazonaws.dynamodb.v20111205#InternalServerError","message":"The server encountered an internal error trying to fulfill the request."}'

Changed in magnetodb:
status: New → Triaged
importance: Low → Medium
Revision history for this message
Ilya Sviridov (isviridov) wrote :

The layer2 of boto client sends expectation by default in form salary:{Exists:False}, name:{Exists:false}, what causes validation exception on storage level.

Layer2 boto integration test should be added

Revision history for this message
Dmitriy Ukhlov (dukhlov) wrote :

Hm, strange. It looks like hash_key is missed in put_item operation, but we got another error. If I understood correctly...

Revision history for this message
Ilya Sviridov (isviridov) wrote :

dukhlov, yes. In the original code sample it is missed, but the stacktrace output corresponds to

users.put_item(data={'name':'aj', 'salary':1000})

tags: added: dynamodb-api
removed: dynamo-api
Revision history for this message
Ilya Sviridov (isviridov) wrote :
Changed in magnetodb:
milestone: kilo-2 → kilo-3
Changed in magnetodb:
milestone: kilo-3 → l-1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.