Explorar el Código

update py/DynamoDB-UpdateItem.py.

xdc hace 5 años
padre
commit
f02f52badd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      py/DynamoDB-UpdateItem.py

+ 1 - 1
py/DynamoDB-UpdateItem.py

@@ -20,7 +20,7 @@ def increase_rating(keya,dynamodb=None):
 def updata_ddb(name,msg,alias):
     client = boto3.client('dynamodb')
     table.update_item(TableName='hehe',
-        Key={'mykey': {'S':name}},
+        Key={'name': {'S':name}},
         UpdateExpression='SET name = :name, alias = :alias',
         ExpressionAttributeValues={
         ':name': {