How to put an Item in AWS DynamoDb using AWS Lambda with Python

veera RVR

Recruit
Using python in AWS Lambda, how do I put/get an item from a DynamoDB table?

In Node.js this would be something like:

Python:
dynamodb.getItem({
    "Key": {"fruitName" : 'banana'},
    "TableName": "fruitSalad"
}, function(err, data) {
    if (err) {
        context.fail('Incorrect username or password');
    } else {
        context.succeed('yay it works');
    }
});

All I need is the python equivalent.
 
Back
Top