@@ -29,7 +29,23 @@ def updata_ddb(name,msg,alias):
'S': alias}
})
-
+def updata_ddbone(age):
+ client = boto3.client('dynamodb')
+ response = client.update_item(
+ TableName='age',
+ Key={
+ 'key': {
+ 'S': "name"
+ }
+ },
+ AttributeUpdates={
+ 'age': {
+ 'Value': {
+ 'S': age
+ )
if __name__ == '__main__':
update_response = increase_rating("cxy")