I was trying to add an item to a dynamodb table, using the boto library. It seemed straightforward. The code I have is:
import boto.dynamodb
c = boto.dynamodb.connect_to_region(aws_access_key_id="xxx",
aws_secret_access_key="xxx",
region_name="us-west-2")
users = c.get_table("users")
users.put_item(data={'username': 'johndoe',
'first_name': 'John',
'last_name': 'Doe'})
However, I get the following error:
'Table' object has no attribute 'put_item'
I think I connected to the database fine, and got the users table fine (the users variable is of the type: boto.dynamodb.table.Table). So, I am not sure why it can't find the put_item method (I even checked the code for the Table class in the boto library, and it has the put_item method). Any insights would be highly appreciated.