Reputation: 44
I need to move an item from one DynamoDb table to another DynamoDB table.
When I use the put_item ()
function I get an error:
<class 'AttributeError'> Object 'dynamodb.ServiceResource' does not have attribute 'put_item'
table = dynamodb.Table ('table1')
newTable = dynamodb.Table('table2')
It's the connection to my tables - the connection is successful I read an item from Table 1 and put data in and sent it to the following function:
try:
dynamodb.put_item(newTable,data)
return data
except:
e, p, t = sys.exc_info ()
print ("test")
print (e, p)
Upvotes: 0
Views: 785